Skip to content

Commit

Permalink
#477 [feat] 액세스 토큰 만료 시간 연장 및 cookie 속성 변경
Browse files Browse the repository at this point in the history
#477 [feat] 액세스 토큰 만료 시간 연장 및 cookie 속성 변경
  • Loading branch information
sohyundoh authored Aug 14, 2024
2 parents 96358a3 + 15cc35b commit 4d10ed1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public class JwtTokenProvider {

private static final String MEMBER_ID = "memberId";
private static final Long ACCESS_TOKEN_EXPIRATION_TIME = 60 * 1000L;
private static final Long ACCESS_TOKEN_EXPIRATION_TIME = 4 * 60 * 60 * 1000L;
private static final Long REFRESH_TOKEN_EXPIRATION_TIME = 60 * 60 * 24 * 1000L * 14;

@Value("${jwt.secret}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class UserController implements UserControllerSwagger {

private final AuthFacade authFacade;
private final static Long COOKIE_MAX_AGE = 60 * 60 * 24 * 1000L * 14;
private final static String REFRESH_TOKEN = "refreshToken";
private final static String REFRESH_TOKEN = "M-RID";

@PostMapping("/login")
@Override
Expand All @@ -45,7 +45,7 @@ public ResponseEntity<SuccessResponse<AccessTokenGetSuccess>> login(
.maxAge(COOKIE_MAX_AGE)
.path("/")
.secure(true)
.sameSite("None")
.sameSite("Strict")
.httpOnly(true)
.build();
response.setHeader("Set-Cookie", cookie.toString());
Expand Down

0 comments on commit 4d10ed1

Please sign in to comment.