dev
This commit is contained in:
@@ -12,16 +12,16 @@ import { User } from '@/entities/user.entity';
|
||||
TypeOrmModule.forFeature([User]),
|
||||
JwtModule.registerAsync({
|
||||
imports: [ConfigModule],
|
||||
useFactory: (configService: ConfigService) => ({
|
||||
secret: configService.get<string>('jwt.secret') || 'dev_secret_key',
|
||||
signOptions: {
|
||||
expiresIn: Number(
|
||||
configService
|
||||
.get<string>('jwt.expiresIn')
|
||||
?.replace(/[^0-9]/g, '') || '7200',
|
||||
),
|
||||
},
|
||||
}),
|
||||
useFactory: (configService: ConfigService) => {
|
||||
const expiresIn = configService.get<string>('jwt.expiresIn') || '2h';
|
||||
console.log('[AuthModule] JWT expiresIn config:', expiresIn);
|
||||
return {
|
||||
secret: configService.get<string>('jwt.secret') || 'dev_secret_key',
|
||||
signOptions: {
|
||||
expiresIn: expiresIn as any,
|
||||
},
|
||||
};
|
||||
},
|
||||
inject: [ConfigService],
|
||||
}),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user