Skip to content

Commit fd6834f

Browse files
committed
fix: RT 전송 오류 수정
1 parent 4b345f8 commit fd6834f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,11 @@ public ResponseResult checkNickName(String nickName){
183183
private ResponseCookie getRefreshToken(String refreshToken) {
184184
return ResponseCookie
185185
.from("REFRESHTOKEN", refreshToken)
186-
.domain(this.domain)
186+
.domain(domain)
187187
.path("/")
188188
.httpOnly(true)
189-
.maxAge(tokenProperties.getRefreshTokenExpirationTime()) //만료시간 설정
189+
.secure(false)
190+
.maxAge(1800000) //만료시간 설정
190191
.build();
191192
}
192193

@@ -227,10 +228,11 @@ public ResponseResult logout(HttpServletResponse response, HttpServletRequest re
227228
try {
228229
//클라이언트 - 토큰 삭제
229230
ResponseCookie refreshCookie = ResponseCookie
230-
.from("REFRESHTOKEN", "") // 추후 토큰값 추가
231-
.domain(this.domain)
231+
.from("REFRESHTOKEN", "localhost")
232+
.domain(domain)
232233
.path("/")
233234
.httpOnly(true)
235+
.secure(false)
234236
.maxAge(0)
235237
.build();
236238
response.setHeader("Set-Cookie", refreshCookie.toString());//쿠키 삭제 요청

0 commit comments

Comments
 (0)