diff --git a/backend/src/main/java/com/carffeine/carffeine/auth/controller/support/RefreshTokenCookieGenerator.java b/backend/src/main/java/com/carffeine/carffeine/auth/controller/support/RefreshTokenCookieGenerator.java index 5e731b81a..8f98ca7af 100644 --- a/backend/src/main/java/com/carffeine/carffeine/auth/controller/support/RefreshTokenCookieGenerator.java +++ b/backend/src/main/java/com/carffeine/carffeine/auth/controller/support/RefreshTokenCookieGenerator.java @@ -21,6 +21,7 @@ public ResponseCookie createCookie(String refreshToken) { return ResponseCookie.from(REFRESH_TOKEN, refreshToken) .maxAge(Duration.ofMillis(expireLength)) .path(VALID_COOKIE_PATH) + .sameSite("None") .secure(true) .httpOnly(true) .build(); @@ -29,6 +30,9 @@ public ResponseCookie createCookie(String refreshToken) { public ResponseCookie createLogoutCookie() { return ResponseCookie.from(REFRESH_TOKEN, LOGOUT_COOKIE_VALUE) .maxAge(LOGOUT_COOKIE_AGE) + .sameSite("None") + .secure(true) + .httpOnly(true) .build(); }