Update pnpm-lock.yaml

This commit is contained in:
Stephanos A
2026-06-17 08:10:59 +03:00
parent ad2a175ff5
commit 81a9c614b7
5 changed files with 294 additions and 26 deletions

View File

@@ -6,9 +6,11 @@ import { ConfigService } from '@nestjs/config';
@Injectable()
export class JwtStrategy extends PassportStrategy(Strategy) {
constructor(config: ConfigService) {
const secret = config.get<string>('JWT_SECRET');
if (!secret) throw new Error('JWT_SECRET environment variable is not set');
super({
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
secretOrKey: config.get('JWT_SECRET'),
secretOrKey: secret,
});
}
async validate(payload: any) {