tnishada
tnishada

Reputation: 1414

Keycloak Single Logout Issue with multiple clients

I have built two keycloak clients (spring-client and a tomcat-client using keycloak OIDC spring boot adapter and OIDC tomcat adapter) and both are working in the same realm. I have two problems with these clients.

  1. When I am going to sign in to those clients, I need to provide username and password for each client separately even though I am using the same browser (multiple tabs) and same username.
  2. When i need to sign out only a single client (tomcat-client) log out and the other client (spring-boot-client) does not logout at all and keep the session until a timeout occurs.

Further when I am investigating I found that there are two separate sessions created for both clients. (see the image)

enter image description here

Since I am using same realm and same user I have no idea that how two sessions were created. There is another thing I noticed, tomcat-client & security-admin-console both clients are in the same session. When I logout from the keycloak admin console then tomcat client automatically logs out. The problem is only with the spring-boot client.

Also I have set each client's admin URL as the base URL of each application.

Can someone help me to sort this out. Thank you

Upvotes: 0

Views: 1463

Answers (1)

tnishada
tnishada

Reputation: 1414

After lots of debugging finally I found the problem in my configuration.

In the spring boot adapter configuration file I have mentioned the Keycloak URL as http://127.0.0.1:8080/auth

In the other adapter configuration file I have mentioned it as http://localhost:8080/auth

the issue was fixed once same URL added for both adapter configurations.

Upvotes: 3

Related Questions