Showing the Okta sign-in screen after a log out with Spring Security Reactive

Greetings all,

We have a Spring Boot application that utilizes okta-spring-boot-starter. After a user logs out of the system, they are redirected to our company’s home page (

However, when the user navigates back to the sign-in screen after logging out, they are “automatically” signed in. How can I force the Okta sign-in screen to be shown and not use any credentials or cookies stored in the browser? I suspect I’m missing something in my securityWebFilterChain(ServerHttpSecurity http) configuration, but I’m not sure what that would be.

SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {

LogoutSpec configureLogout(LogoutSpec logoutSpec) {

ServerLogoutSuccessHandler logoutSuccessHandler(String uri) {
  RedirectServerLogoutSuccessHandler successHandler = new RedirectServerLogoutSuccessHandler()

Hey @jndietz!

Great question! First a little background. By default logging out of an application only removes the local session. The easiest explanation for this is more obvious with “social login”. For example, if I configure an app to “Login with GitHub”, my application doesn’t have the ability to log out of GitHub, just my app.

For cases when you only have a single application, or for a set of apps that your company control, you probably want to let the user end the SSO session for everything.

There are two ways to do this.

Replace your LogoutSuccessHandler with a Bean of type

Something like this (forgive any copy/paste errors):

    OidcClientInitiatedLogoutSuccessHandler logoutSuccessHandler(ClientRegistrationRepository clientRegistrationRepository) {
        OidcClientInitiatedLogoutSuccessHandler successHandler = new OidcClientInitiatedLogoutSuccessHandler(clientRegistrationRepository);
        return successHandler;

Or if you are already using the okta-spring-boot-starter configuring the following property sets up that bean for you:


Keep us posted!

1 Like

Hey @bdemers , thanks for taking the time to respond. I swear I tried using this configuration, but it didn’t work.

I noticed that the kebab case in YAML doesn’t appear to work: doesn’t work, but okta.oauth2.postLogoutRedirectUri does work.

Thanks again for the help, @bdemers.

Edit: I should note this solved my issue where the Okta sign-in screen was not displayed after a log out (it would just log the previous user back in).

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.