Skip to content

Commit 5e5070f

Browse files
committed
fix: 배포 설정으로 인해 기존 코드로 변경 #23
1 parent fdec630 commit 5e5070f

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/main/java/org/dfbf/soundlink/domain/user/service/KakaoAuthService.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ public class KakaoAuthService {
4242
@Value("${REFRESH_TOKEN_EXPIRATION_TIME}")
4343
private int REFRESH_TOKEN_EXPIRATION_TIME;
4444

45-
@Value("${HTTP_ONLY_COOKIE}")
46-
private boolean httpOnlyCookie;
47-
4845
/**
4946
* 카카오 로그인 및 JWT 발급
5047
*/
@@ -138,7 +135,7 @@ private ResponseCookie getRefreshToken(String refreshToken) {
138135
.domain(domain)
139136
.path("/")
140137
.httpOnly(true)
141-
.secure(httpOnlyCookie)
138+
.secure(false)
142139
.maxAge(REFRESH_TOKEN_EXPIRATION_TIME/1000) // 만료시간 설정(밀리초 -> 초로 변경)
143140
.build();
144141
}

src/main/java/org/dfbf/soundlink/domain/user/service/UserService.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ public class UserService {
4949

5050
private static final String domain = "";
5151

52-
@Value("${HTTP_ONLY_COOKIE}")
53-
private boolean httpOnlyCookie;
54-
5552
// 회원가입
5653
public ResponseResult signUp(UserSignUpDto userSignUpDto) {
5754
try {
@@ -217,7 +214,7 @@ private ResponseCookie getRefreshToken(String refreshToken) {
217214
.domain(domain)
218215
.path("/")
219216
.httpOnly(true)
220-
.secure(httpOnlyCookie)
217+
.secure(false)
221218
.maxAge(REFRESH_TOKEN_EXPIRATION_TIME/1000) // 만료시간 설정(밀리초 -> 초로 변경)
222219
.build();
223220
}
@@ -264,7 +261,7 @@ public ResponseResult logout(HttpServletResponse response, HttpServletRequest re
264261
.domain(domain)
265262
.path("/")
266263
.httpOnly(true)
267-
.secure(httpOnlyCookie)
264+
.secure(false)
268265
.maxAge(0)
269266
.build();
270267
response.setHeader("Set-Cookie", refreshCookie.toString());//쿠키 삭제 요청

0 commit comments

Comments
 (0)