Skip to content

Commit

Permalink
feat: 이미 존재하는 회원 login redirect uri 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonjy committed Jul 9, 2024
1 parent f8f103e commit 2cd3861
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
if(oAuth2User.getRole() == Role.GUEST) {
String accessToken = jwtService.createAccessToken(oAuth2User.getEmail());
response.addHeader(jwtService.getAccessHeader(), "Bearer " + accessToken);
response.sendRedirect("/social-login?Authorization=" + accessToken);
response.sendRedirect("/social-login?exist=false&Authorization=" + accessToken);

jwtService.sendAccessAndRefreshToken(response, accessToken, null);
} else {
Expand All @@ -47,7 +47,7 @@ private String loginSuccess(HttpServletResponse response, CustomOAuth2User oAuth

jwtService.sendAccessAndRefreshToken(response, accessToken, refreshToken);
jwtService.updateRefreshToken(oAuth2User.getEmail(), refreshToken);
return "/?Authorization=" + accessToken + "&Authorization-Refresh=" + refreshToken;
return "/social-login?exist=true&Authorization=" + accessToken + "&Authorization-Refresh=" + refreshToken;
}
}

0 comments on commit 2cd3861

Please sign in to comment.