add JwtModule import to QrAuthModule
This commit is contained in:
@@ -1,7 +1,21 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { JwtModule } from '@nestjs/jwt';
|
||||
import { ConfigModule, ConfigService } from '@nestjs/config';
|
||||
import { QrAuthService } from './qr-auth.service';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
JwtModule.registerAsync({
|
||||
imports: [ConfigModule],
|
||||
inject: [ConfigService],
|
||||
useFactory: (config: ConfigService) => ({
|
||||
secret: config.get<string>('app.jwt.accessSecret'),
|
||||
signOptions: {
|
||||
expiresIn: config.get<any>('app.jwt.accessExpiresIn'),
|
||||
},
|
||||
}),
|
||||
}),
|
||||
],
|
||||
providers: [QrAuthService],
|
||||
exports: [QrAuthService],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user