Skip to content

Commit

Permalink
FIX : RedirectURL 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
juwum12 committed Apr 15, 2024
1 parent 9356da6 commit 9a8eb0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public String kakaoLogin(@RequestParam String code,

kakaoService.kakaoLogin(code, response);
// return "redirect:/";
return "redirect:http://localhost:3000/";
return "redirect:https://www.dongnaebangnae.com/";

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ public class KakaoService {
private final String local= "http://localhost:8080/api/user/kakao/callback";
private final String frontLocal = "http://localhost:3000/api/user/kakao/callback";
private final String aws = "https://hhboard.shop/api/user/kakao/callback";
private final String domain = "https://www.dongnaebangnae.com/api/user/kakao/callback";

@Value("${spring.security.oauth2.client.registration.kakao.client-id}")
private String clientId;

@Transactional
public void kakaoLogin(String code , HttpServletResponse response) throws JsonProcessingException, IOException {
// 1. "인가 코드"로 "액세스 토큰" 요청
String accessToken = getAccessToken(code, aws);
String accessToken = getAccessToken(code, domain);

// 2. 필요시에 회원가입 및 위치 정보(address 값) 저장
User kakaoUser = registerKakaoUserIfNeeded(accessToken);
Expand Down

0 comments on commit 9a8eb0a

Please sign in to comment.