Skip to content

Commit

Permalink
Merge pull request #77 from SWM-SMART/feat/#76
Browse files Browse the repository at this point in the history
로그아웃 후 재로그인 시 에러 해결
  • Loading branch information
noparamin authored Nov 23, 2023
2 parents f9be2c9 + a2ef559 commit b338408
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 b338408

Please sign in to comment.