From d58b5dcab70d8412339855935e9a39f40d403f42 Mon Sep 17 00:00:00 2001 From: hou27 Date: Mon, 1 Jan 2024 16:20:58 +0900 Subject: [PATCH] =?UTF-8?q?hotfix:=20refresh=20token=EC=9D=B4=20redis?= =?UTF-8?q?=EC=97=90=20=EC=82=B4=EC=95=84=EC=9E=88=EB=8A=94=20=EA=B8=B0?= =?UTF-8?q?=EA=B0=84=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 성태님 덕분에 발견한 정책에 부합하지 않던 redis ttl 설정값 수정 --- src/auth/auth.module.ts | 2 +- src/auth/jwt/jwt.payload.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auth/auth.module.ts b/src/auth/auth.module.ts index edaffa8..ff157f5 100644 --- a/src/auth/auth.module.ts +++ b/src/auth/auth.module.ts @@ -13,7 +13,7 @@ import { OAuthUtil } from './util/oauth.util'; import { ContentsModule } from '../contents/contents.module'; const accessTokenExpiration = TWOHOUR; -export const refreshTokenExpirationInCache = 60 * 60 * 24 * 30; +export const refreshTokenExpirationInCache = 60 * 60 * 24 * 365; // 1 year export const refreshTokenExpirationInCacheShortVersion = 60 * 60 * 24 * 2; export const verifyEmailExpiration = 60 * 5; diff --git a/src/auth/jwt/jwt.payload.ts b/src/auth/jwt/jwt.payload.ts index 13c9b22..6ac23a4 100644 --- a/src/auth/jwt/jwt.payload.ts +++ b/src/auth/jwt/jwt.payload.ts @@ -1,6 +1,6 @@ export class Payload { email!: string; // user email - period!: string; // '30d' or '2h' that indicates whether or not you are an auto-login user + period!: string; // '1y' or '2d' that indicates whether or not you are an auto-login user sub!: number; // userId }