Skip to content

Commit

Permalink
fix oidc logout
Browse files Browse the repository at this point in the history
  • Loading branch information
vdiskg committed Mar 4, 2023
1 parent 16f4e06 commit a9770c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ protected void configure(HttpSecurity http) throws Exception {
this.clientRegistrationRepository)));
http.oauth2Client();
http.logout(configure -> {
configure.logoutUrl("/user/logout");
OidcClientInitiatedLogoutSuccessHandler logoutSuccessHandler = new OidcClientInitiatedLogoutSuccessHandler(
this.clientRegistrationRepository);
logoutSuccessHandler.setPostLogoutRedirectUri("{baseUrl}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ public class OidcLogoutHandler implements LogoutHandler {

@Override
public void logout(HttpServletRequest request, HttpServletResponse response) {
try {
response.sendRedirect(request.getContextPath() + "/logout");
} catch (IOException e) {
throw new RuntimeException(e);
}
// do nothing here
}
}

0 comments on commit a9770c8

Please sign in to comment.