Skip to content

Commit

Permalink
[#2]🐛Fix: 쿠키 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
sumin220 committed Nov 22, 2024
1 parent 9ea00ee commit 2f73f78
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
int refreshTokenMaxAge = jwtUtils.getRefreshExpiration().intValue() / 1000;

Cookie accessTokenCookie = new Cookie("accessToken", accessToken);
accessTokenCookie.setHttpOnly(true);
accessTokenCookie.setSecure(true);
accessTokenCookie.setHttpOnly(true); // js 접근 불가
accessTokenCookie.setSecure(false);
accessTokenCookie.setPath("/");
accessTokenCookie.setMaxAge(accessTokenMaxAge);

Cookie refreshTokenCookie = new Cookie("refreshToken", refreshToken);
refreshTokenCookie.setHttpOnly(true);
refreshTokenCookie.setSecure(true);
refreshTokenCookie.setHttpOnly(true); // js 접근 불가
refreshTokenCookie.setSecure(false);
refreshTokenCookie.setPath("/");
refreshTokenCookie.setMaxAge(refreshTokenMaxAge);

Expand Down

0 comments on commit 2f73f78

Please sign in to comment.