From 0a380b7941fb9e3234239c03d38b155e8a8c3cad Mon Sep 17 00:00:00 2001 From: JoonSoo-Kim Date: Mon, 27 Nov 2023 18:57:55 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=ED=86=A0=ED=81=B0=20=EB=A7=8C?= =?UTF-8?q?=EB=A3=8C=20=EA=B8=B0=EA=B0=84=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 토큰 만료 기간을 액세스 토큰 1시간, 리프레쉬 토큰 24시간으로 수정 --- BE/src/auth/auth.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BE/src/auth/auth.service.ts b/BE/src/auth/auth.service.ts index 846b386..1553360 100644 --- a/BE/src/auth/auth.service.ts +++ b/BE/src/auth/auth.service.ts @@ -34,13 +34,13 @@ export class AuthService { if (await bcrypt.compare(password, user.password)) { const payload = { userId }; const accessToken = await this.jwtService.sign(payload, { - expiresIn: "5m", + expiresIn: "1h", }); const refreshToken = await this.jwtService.sign(payload, { - expiresIn: "1h", + expiresIn: "24h", }); - // refresh token의 expire time을 1시간으로 설정 + // 86000s = 24h await this.redisClient.set(userId, refreshToken, "EX", 86400); return new AccessTokenDto(accessToken); @@ -58,7 +58,7 @@ export class AuthService { const payload = { userId }; const accessToken = await this.jwtService.sign(payload, { - expiresIn: "5m", + expiresIn: "1h", }); return new AccessTokenDto(accessToken);