Skip to content

Commit

Permalink
토큰 관련 이슈 해결 (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
jagaldol authored Nov 11, 2023
2 parents 1fb7c98 + 75861f8 commit d4ea44b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ public ResponseEntity<?> logout(@AuthenticationPrincipal CustomUserDetails userD
userService.logout(userDetails.getId());

ResponseCookie responseCookie = ResponseCookie.from("refreshToken", "")
.maxAge(0)
.httpOnly(true) // javascript 접근 방지
.secure(true) // https 통신 강제
.sameSite("None")
.maxAge(0)
.build();

var response = ApiUtils.success();
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ logging:
# jwt token config
bungaebowling:
token_exp:
access: 172800
access: 600
refresh: 2592000
secret: ${TOKEN_SECRET}
domain: ${DOMAIN}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-product.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ logging:
# jwt token config
bungaebowling:
token_exp:
access: 172800
access: 600
refresh: 2592000
secret: ${TOKEN_SECRET}
domain: ${DOMAIN}
Expand Down

0 comments on commit d4ea44b

Please sign in to comment.