✨ Feat: Dashboard accuracy, Staff & Settings modules, and File Auth fix
This commit is contained in:
@@ -18,7 +18,12 @@ export class JwtStrategy extends PassportStrategy(Strategy) {
|
||||
private dataSource: DataSource,
|
||||
) {
|
||||
super({
|
||||
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
|
||||
jwtFromRequest: ExtractJwt.fromExtractors([
|
||||
ExtractJwt.fromAuthHeaderAsBearerToken(),
|
||||
(req) => {
|
||||
return req.query ? (req.query as any).token : null;
|
||||
},
|
||||
]),
|
||||
ignoreExpiration: false,
|
||||
secretOrKey: configService.getOrThrow<string>('JWT_SECRET'),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user