Skip to content

Commit

Permalink
Merge pull request #79 from SWM-SMART/dev
Browse files Browse the repository at this point in the history
로그아웃 후 재로그인 시 에러 해결
  • Loading branch information
noparamin authored Nov 23, 2023
2 parents 1916c72 + b338408 commit 86fc5fc
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
ResponseCookie cookie = jwtService.setCookieRefreshToken(refreshToken);
response.setHeader("Set-Cookie", cookie.toString());
response.sendRedirect(frontUrl); // 추후 수정
// response.sendRedirect("http//localhost:8081");
User findUser = userRepository.findByEmail(oAuth2User.getEmail())
.orElseThrow(() -> new IllegalArgumentException("이메일에 해당하는 유저가 없습니다."));
User findUser = userRepository.findById(oAuth2User.getUserId())
.orElseThrow(() -> new IllegalArgumentException("아이디에 해당하는 유저가 없습니다."));
findUser.authorizeUser();
} else {
loginSuccess(response, oAuth2User);
Expand Down

0 comments on commit 86fc5fc

Please sign in to comment.