Skip to content

Commit

Permalink
hotfix: refresh token이 redis에 살아있는 기간 조정
Browse files Browse the repository at this point in the history
성태님 덕분에 발견한 정책에 부합하지 않던 redis ttl 설정값 수정
  • Loading branch information
hou27 committed Jan 1, 2024
1 parent 42155fc commit d58b5dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/auth/auth.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/auth/jwt/jwt.payload.ts
Original file line number Diff line number Diff line change
@@ -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
}

Expand Down

0 comments on commit d58b5dc

Please sign in to comment.