diff --git a/apps/dnet-orgs-database-application/src/main/java/eu/dnetlib/organizations/WebSecurityConfig.java b/apps/dnet-orgs-database-application/src/main/java/eu/dnetlib/organizations/WebSecurityConfig.java index 181f2814..212bf5fe 100644 --- a/apps/dnet-orgs-database-application/src/main/java/eu/dnetlib/organizations/WebSecurityConfig.java +++ b/apps/dnet-orgs-database-application/src/main/java/eu/dnetlib/organizations/WebSecurityConfig.java @@ -99,7 +99,13 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { } private OidcClientInitiatedLogoutSuccessHandler oidcLogoutSuccessHandler() { - return new OidcClientInitiatedLogoutSuccessHandler(clientRegistrationRepository); + final OidcClientInitiatedLogoutSuccessHandler handler = new OidcClientInitiatedLogoutSuccessHandler(clientRegistrationRepository); + // NB: + // The same URL must be configured server side: + // Manage Clients > Edit Client > Other > Post-Logout Redirect + handler.setPostLogoutRedirectUri("{baseUrl}"); + return handler; + } private OAuth2UserService oidcUserService() {