Skip to content

Commit

Permalink
Merge pull request #166 from boostcampwm-2024/be/fix/tokens
Browse files Browse the repository at this point in the history
[BE/fix] 토큰 time 수정
  • Loading branch information
HBLEEEEE authored Dec 4, 2024
2 parents 48e282c + 6445458 commit e857acb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/backend/src/auth/auth.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { APP_GUARD } from '@nestjs/core';
inject: [ConfigService],
useFactory: async (configService: ConfigService) => ({
secret: configService.get<string>('JWT_SECRET'),
signOptions: { expiresIn: '1h' }
signOptions: { expiresIn: '24h' }
})
})
],
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class AuthService {

private async generateTokens(memberId: number, nickname: string) {
const payload = { memberId, nickname };
const accessToken = this.jwtService.sign(payload, { expiresIn: '1h' });
const accessToken = this.jwtService.sign(payload, { expiresIn: '24h' });
const refreshToken = this.jwtService.sign(payload, { expiresIn: '7d' });
return { accessToken, refreshToken };
}
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/src/websocket/websocket.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { ChartModule } from 'src/chart/chart.module';
inject: [ConfigService],
useFactory: async (configService: ConfigService) => ({
secret: configService.get<string>('JWT_SECRET'),
signOptions: { expiresIn: '1h' }
signOptions: { expiresIn: '24h' }
})
}),
forwardRef(() => ChartModule)
Expand Down

0 comments on commit e857acb

Please sign in to comment.