From 92135b495ed96906a67600d40d887301beb9e79a Mon Sep 17 00:00:00 2001 From: stae1102 Date: Tue, 13 Aug 2024 10:16:17 +0900 Subject: [PATCH] =?UTF-8?q?[QA-340]=20=EC=95=A1=EC=84=B8=EC=8A=A4=20?= =?UTF-8?q?=ED=86=A0=ED=81=B0=20=EB=A7=8C=EB=A3=8C=EA=B8=B0=EA=B0=84=201?= =?UTF-8?q?=EB=85=84=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/auth/auth.service.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts index ef6de54..221739a 100644 --- a/src/auth/auth.service.ts +++ b/src/auth/auth.service.ts @@ -36,16 +36,13 @@ export class AuthService { private readonly redisService: RedisService, ) {} - async jwtLogin({ - email, - password, - auto_login, - }: LoginBodyDto): Promise { + async jwtLogin({ email, password }: LoginBodyDto): Promise { try { + const autoLogin = true; const { user } = await this.validateUser({ email, password }); const payload: Payload = this.jwtService.createPayload( email, - auto_login, + autoLogin, user.id, ); const refreshToken = await this.jwtService.generateRefreshToken(payload); @@ -53,9 +50,7 @@ export class AuthService { await this.redisService.set( `${REFRESH_TOKEN_KEY}:${user.id}`, refreshToken, - auto_login - ? refreshTokenExpirationInCache - : refreshTokenExpirationInCacheShortVersion, + refreshTokenExpirationInCache, ); return {