Skip to content

Commit

Permalink
Merge pull request #26 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 7780590 + 13b03b3 commit 2eae06f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.mjulikelion.baker.util.security.JwtEncoder;
import org.mjulikelion.baker.util.security.JwtTokenProvider;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.server.Session.Cookie;
import org.springframework.boot.web.server.Cookie.SameSite;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseCookie;
import org.springframework.http.ResponseEntity;
Expand Down Expand Up @@ -49,7 +49,7 @@ public ResponseEntity<ResponseDto<Void>> login(AuthLoginRequestDto authLoginRequ

ResponseCookie cookie = ResponseCookie.from(ACCESS_TOKEN, JwtEncoder.encodeJwtBearerToken(jwtToken))
.secure(true)
.sameSite(String.valueOf(Cookie.SameSite.LAX))
.sameSite(String.valueOf(SameSite.NONE))
.maxAge(Duration.ofMinutes(cookieMaxAge))
.httpOnly(true)
.path(ROOT_PATH)
Expand Down

0 comments on commit 2eae06f

Please sign in to comment.