File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/main/java/com/boggle_boggle/bbegok/controller Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2020import org .springframework .web .bind .annotation .*;
2121import org .springframework .beans .factory .annotation .Value ;
2222
23+ import java .io .IOException ;
2324import java .util .Map ;
2425import java .util .UUID ;
2526
@@ -51,12 +52,14 @@ public DataResponseDto<OAuthLoginResponse> signup(@Valid @RequestBody SignupRequ
5152
5253 //리다이렉트할 인증서버URI를 리턴
5354 @ GetMapping ("/oauth2/authorize" )
54- public DataResponseDto <Map <String , String >> authorize (@ RequestParam ("provider" ) ProviderType providerType , HttpSession session ) {
55+ public void authorize (@ RequestParam ("provider" ) ProviderType providerType , HttpSession session ,
56+ HttpServletResponse response ) throws IOException {
5557 String state = UUID .randomUUID ().toString ();
5658 session .setAttribute ("oauth2_state" , state );
5759
5860 String redirectUrl = oAuth2RedirectUriBuilder .buildRedirectUri (providerType , state );
59- return DataResponseDto .of (Map .of ("redirectUrl" , redirectUrl ));
61+ response .sendRedirect (redirectUrl ); // 실제 리디렉션
62+ //return DataResponseDto.of(Map.of("redirectUrl", redirectUrl));
6063 }
6164
6265 //oauth 인증서버에서 인가코드를 리다이렉트(302)하는 콜백 API
You can’t perform that action at this time.
0 commit comments