diff --git a/backend/src/main/java/zipgo/auth/support/RefreshTokenCookieProvider.java b/backend/src/main/java/zipgo/auth/support/RefreshTokenCookieProvider.java index ea5ea66e..36866e24 100644 --- a/backend/src/main/java/zipgo/auth/support/RefreshTokenCookieProvider.java +++ b/backend/src/main/java/zipgo/auth/support/RefreshTokenCookieProvider.java @@ -23,6 +23,7 @@ public RefreshTokenCookieProvider(JwtCredentials jwtCredentials) { public ResponseCookie createCookie(String refreshToken) { return ResponseCookie.from(REFRESH_TOKEN, refreshToken) .sameSite("None") + .domain(".zipgo.pet") .maxAge(Duration.ofMillis(expirationTime)) .path(VALID_COOKIE_PATH) .secure(true) @@ -33,6 +34,7 @@ public ResponseCookie createCookie(String refreshToken) { public ResponseCookie createLogoutCookie() { return ResponseCookie.from(REFRESH_TOKEN, LOGOUT_COOKIE_VALUE) .sameSite("None") + .domain(".zipgo.pet") .maxAge(LOGOUT_COOKIE_AGE) .build(); }