chore(deps): upgrade NestJS and related dependencies to version 11.x
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 32s
Test Suite / flutter-quality (push) Successful in 51s

fix(auth): ensure JWT_SECRET is set in JwtStrategy constructor
This commit is contained in:
Nils-Johan Gynther
2026-05-12 22:00:29 +02:00
parent 621ced0e43
commit 4471e344eb
4 changed files with 1147 additions and 1329 deletions
+6 -1
View File
@@ -7,10 +7,15 @@ export class JwtStrategy extends PassportStrategy(Strategy) {
private readonly logger = new Logger(JwtStrategy.name);
constructor() {
const jwtSecret = process.env.JWT_SECRET;
if (!jwtSecret) {
throw new Error('JWT_SECRET is not set');
}
super({
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
ignoreExpiration: false,
secretOrKey: process.env.JWT_SECRET,
secretOrKey: jwtSecret,
});
}