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
+1128 -1318
View File
File diff suppressed because it is too large Load Diff
+10 -10
View File
@@ -13,18 +13,18 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@nestjs/common": "^10.3.0",
"@nestjs/core": "^10.3.0",
"@nestjs/jwt": "^10.2.0",
"@nestjs/passport": "^10.0.3",
"@nestjs/platform-express": "^10.3.0",
"@nestjs/common": "^11.1.19",
"@nestjs/core": "^11.1.19",
"@nestjs/jwt": "^11.0.2",
"@nestjs/passport": "^11.0.5",
"@nestjs/platform-express": "^11.1.19",
"@nestjs/throttler": "^6.4.0",
"@prisma/client": "6.12.0",
"bcryptjs": "^2.4.3",
"class-transformer": "^0.5.1",
"class-validator": "^0.15.1",
"helmet": "^8.0.0",
"multer": "^1.4.5-lts.2",
"multer": "^2.1.1",
"passport": "^0.7.0",
"passport-jwt": "^4.0.1",
"prisma": "6.12.0",
@@ -34,11 +34,11 @@
"uuid": "^11.1.0"
},
"devDependencies": {
"@nestjs/cli": "^10.3.0",
"@nestjs/schematics": "^10.1.1",
"@nestjs/testing": "^10.3.0",
"@nestjs/cli": "^11.0.21",
"@nestjs/schematics": "^11.1.0",
"@nestjs/testing": "^11.1.19",
"@types/bcryptjs": "^2.4.6",
"@types/express": "^4.17.21",
"@types/express": "^5.0.5",
"@types/jest": "^29.5.14",
"@types/multer": "^1.4.12",
"@types/node": "^22.15.29",
+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,
});
}