"You are already logged in" after successful IDP logout and subsequent visit to service app homepage in same browser window

I have a service app working with Keycloak and an OIDC IDP. I can successfully visit my service app homepage, get redirected properly to custom Keycloak login page. Login with my IDP and get redirected back to my service app. After logout I land on my custom Keycloak login page with the following url:


If I then visit my service app’s homepage in the same browser window, I get redirected to the same Keycloak login page and url, but with a different tab_id:


I can then successfully authenticate with my IDP but instead of getting redirected to the service app home page, I land on my custom Keycloak login page with the message “You are already logged in”.

Can anyone shed some light on this situation?

Thank you in advance for your time and attention to this matter.


Just a “bump” to see if anyone has any suggestions here. Thanks! Benjamin

Are there any insights??