Skip to content

Commit

Permalink
Merge pull request #34 from mju-likelion/feature/login-cookie-error-#24
Browse files Browse the repository at this point in the history
Feature/#24 로그인 시 Cookie 설정 문제
  • Loading branch information
Dh3356 authored Feb 27, 2024
2 parents 04a3809 + 295c202 commit 1e9d187
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) throws
.logoutUrl(logoutUrl)
.logoutSuccessHandler((request, response, authentication) -> {
ResponseCookie cookie = ResponseCookie.from(ACCESS_TOKEN, "")
.secure(true)
.sameSite("None")
.maxAge(ZERO)
.path("/")
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public ResponseEntity<ResponseDto<Void>> login(AuthLoginRequestDto authLoginRequ

ResponseCookie cookie = ResponseCookie.from(ACCESS_TOKEN, JwtEncoder.encodeJwtBearerToken(jwtToken))
.maxAge(Duration.ofMillis(cookieMaxAge))
.secure(true)
.sameSite("None")
.httpOnly(true)
.path(ROOT_PATH)
.build();
Expand Down

0 comments on commit 1e9d187

Please sign in to comment.