I like to implement more than one named passport-JWT strategy, each with its own secret
. Is there any way it can be implemented?
From what I can understand from the documentation, only one secret can be registered during module initialization:
@Module({
imports: [
UsersModule,
PassportModule,
JwtModule.register({
secret: jwtConstants.secret,
signOptions: { expiresIn: '60s' },
}),
],
providers: [AuthService, LocalStrategy],
exports: [AuthService, JwtModule],
})