Skip to content

Commit

Permalink
Merge pull request #20 from Innovix-Matrix-Systems/IMS-25
Browse files Browse the repository at this point in the history
Fix token expiration timing issue
  • Loading branch information
AHS12 authored Dec 21, 2024
2 parents 0dba55b + c8e4ef1 commit 92c35f6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/modules/auth/auth.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { JwtModule } from '@nestjs/jwt';
import { PassportModule } from '@nestjs/passport';
import { EmailModule } from '../email/email.module';
import { UserModule } from '../user/user.module';
import { AuthController } from './auth.controller';
import { AuthService } from './auth.service';
import { JwtStrategy } from './strategies/jwt.strategy';
import { PassportModule } from '@nestjs/passport';
import { GoogleStrategy } from './strategies/google.strategy';
import { JwtStrategy } from './strategies/jwt.strategy';

@Module({
imports: [
Expand All @@ -17,7 +17,8 @@ import { GoogleStrategy } from './strategies/google.strategy';
useFactory: async (configService: ConfigService) => ({
secret: configService.get<string>('JWT_SECRET'),
signOptions: {
expiresIn: configService.get<string>('JWT_EXPIRATION') || '30d',
expiresIn:
Number(configService.get<string>('JWT_EXPIRATION')) || '30d',
},
}),
inject: [ConfigService],
Expand Down

0 comments on commit 92c35f6

Please sign in to comment.