add fast-jwt ( not tested ) and make the user actual register
All checks were successful
Code quality checks / biome (push) Successful in 8s

This commit is contained in:
creations 2025-05-02 18:41:10 -04:00
parent f93cef442a
commit 57fb8d8bb1
Signed by: creations
GPG key ID: 8F553AA4320FC711
10 changed files with 227 additions and 27 deletions

View file

@ -24,17 +24,30 @@ const cassandra: CassandraConfig = {
authEnabled: process.env.CASSANDRA_AUTH_ENABLED === "false",
};
const jwt: JWTConfig = {
secret: process.env.JWT_SECRET || "",
expiration: process.env.JWT_EXPIRATION || "1h",
issuer: process.env.JWT_ISSUER || "",
algorithm: process.env.JWT_ALGORITHM || "HS256",
};
function verifyRequiredVariables(): void {
const requiredVariables = [
"HOST",
"PORT",
"REDIS_URL",
"REDIS_TTL",
"CASSANDRA_HOST",
"CASSANDRA_PORT",
"CASSANDRA_CONTACT_POINTS",
"CASSANDRA_AUTH_ENABLED",
"CASSANDRA_DATACENTER",
"JWT_SECRET",
"JWT_EXPIRATION",
"JWT_ISSUER",
];
let hasError = false;
@ -52,4 +65,4 @@ function verifyRequiredVariables(): void {
}
}
export { environment, cassandra, redisTtl, verifyRequiredVariables };
export { environment, cassandra, redisTtl, verifyRequiredVariables, jwt };