Skip to content

Commit

Permalink
Fix: redirection url 값 재설정
Browse files Browse the repository at this point in the history
  • Loading branch information
nampongo committed Mar 15, 2024
1 parent d6c7b5d commit ad69927
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti

http
.authorizeHttpRequests(authorizeHttpRequests -> authorizeHttpRequests
.requestMatchers("/oauth2/**", "/api/v1/members/customlogin").permitAll()
.requestMatchers("/oauth2/**").permitAll()
.anyRequest().authenticated()
)
.sessionManagement(sessionManagement ->
Expand All @@ -52,7 +52,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
.baseUri("/oauth2/authorization")
)
.redirectionEndpoint(redirection -> redirection
.baseUri("/login/oauth2/code/**")
.baseUri("/**")
)
.userInfoEndpoint(userInfo -> userInfo.userService(customOAuth2UserService))
.successHandler(oAuth2AuthenticationSuccessHandler)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
out.flush();*/

String url = makeRedirectUrl(token.getAccessToken(), token.getRefreshToken(), token.getHasInfo());
getRedirectStrategy().sendRedirect(request, response, url);
response.sendRedirect(url);
}

private String makeRedirectUrl(String access, String refresh, Boolean hasInfo) {
Expand Down

0 comments on commit ad69927

Please sign in to comment.