99import io .swagger .v3 .oas .annotations .tags .Tag ;
1010import jakarta .servlet .http .HttpServletResponse ;
1111import lombok .RequiredArgsConstructor ;
12+ import org .springframework .beans .factory .annotation .Value ;
1213import org .springframework .http .HttpStatus ;
1314import org .springframework .http .ResponseEntity ;
1415import org .springframework .web .bind .annotation .*;
1920@ Tag (name = "Social OAuth API" , description = "소셜 로그인 관련 API (카카오)" )
2021public class OAuthController {
2122
23+ @ Value ("${custom.oauth2.kakao.redirect.new-user}" )
24+ private String newUserRedirectUrl ;
25+
26+ @ Value ("${custom.oauth2.kakao.redirect.existing-user}" )
27+ private String existingUserRedirectUrl ;
28+
2229 private final OauthService oauthService ;
2330
2431 @ Operation (summary = "카카오 소셜 로그인 API" )
@@ -37,8 +44,8 @@ public void kakaoLogin(@RequestParam(value = "code", required = false) String co
3744 ResultResponse <?> resultResponse = oauthService .kakaoLogin (accessToken , response );
3845 ParentLoginResponseDto dto = (ParentLoginResponseDto ) resultResponse .getData ();
3946 String redirectUrl = dto .isNewUser ()
40- ? "https://localhost:3000/join/parent/1"
41- : "https://localhost:3000" ;
47+ ? newUserRedirectUrl
48+ : existingUserRedirectUrl ;
4249 response .sendRedirect (redirectUrl );
4350 } catch (BusinessException e ) {
4451 try {
0 commit comments