diff --git a/src/main/java/com/haejwo/tripcometrue/global/springsecurity/OAuth2LoginSuccessHandler.java b/src/main/java/com/haejwo/tripcometrue/global/springsecurity/OAuth2LoginSuccessHandler.java index 5fa3ab25..435ddee9 100644 --- a/src/main/java/com/haejwo/tripcometrue/global/springsecurity/OAuth2LoginSuccessHandler.java +++ b/src/main/java/com/haejwo/tripcometrue/global/springsecurity/OAuth2LoginSuccessHandler.java @@ -17,6 +17,7 @@ * @implNote 해당 클래스는 SimpleUrlAuthenticationSuccessHandler를 상속받은 OAuth 로그인 성공 후 로직을 처리 하는 클래스 * 로그인 성공 후 리디렉트 하게 설정 했습니다. * 프론트 배포사이트 -> http://localhost:5173/auth/social + * https://tripcometrue.vercel.app * 스프링 코드 내로 리디렉트 설정 하고 싶은 경우 * String redirectUrl = "/user/oauth-success?token="+token; */ @@ -38,7 +39,7 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo //한국어 인코딩 설정 String encodedName = URLEncoder.encode(name, StandardCharsets.UTF_8.toString()); - String redirectUrl = "http://localhost:5173/auth/social?token=" + token + String redirectUrl = "https://tripcometrue.vercel.app/auth/social?token=" + token + "&email=" + email + "&name=" + encodedName; getRedirectStrategy().sendRedirect(request, response, redirectUrl); } diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index b9a61e2b..abf0710e 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -42,13 +42,13 @@ spring: - email client-name: Naver authorization-grant-type: authorization_code - redirect-uri: http://tripcometrue.site/login/oauth2/code/naver + redirect-uri: https://tripcometrue.site/login/oauth2/code/naver kakao: client-id: ${KAKAO_ID} client-secret: ${KAKAO_KEY} client-authentication-method: client_secret_post - redirect-uri: http://tripcometrue.site/login/oauth2/code/kakao + redirect-uri: https://tripcometrue.site/login/oauth2/code/kakao authorization-grant-type: authorization_code client-name: Kakao scope: