Keycloak one client Logout with it will impact multiple clients due opened same browser

116 views
Skip to first unread message

nandish kumar

unread,
Jun 5, 2025, 5:33:25 AM6/5/25
to Keycloak User
Hi Team,

I have built two keycloak clients (client1 and a client2 ) and both are working in the same realm. I have two problems with these clients.

  1. When i need to sign out a client1 and the other client2  logout this is impact on production activities.

Regards
Nandish.

nandish kumar

unread,
Jun 5, 2025, 5:34:54 AM6/5/25
to Keycloak User
overcome form this we can create any SPI? Guide me what is the right method we need to use.

Alexander Schwartz

unread,
Jun 12, 2025, 1:19:11 PM6/12/25
to nandish kumar, Keycloak User
Hi Nandish,

In the example above, Keycloak creates one user session and two client sessions connected to the user session. 

If you use logout, Keycloak will always terminate the user session and the client sessions as you observed. 

If you only want to terminate a client session, the client can revoke its refresh token. See https://www.rfc-editor.org/rfc/rfc7009 for the RFC. 
If I remember correctly, the user session will stay alive if there is at least one other client session active. 

Best,
Alexander

--
You received this message because you are subscribed to the Google Groups "Keycloak User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-use...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/keycloak-user/91fd6f99-c182-417d-b9df-035140c14e51n%40googlegroups.com.


--

Alexander Schwartz, RHCE

He/Him

Principal Software Engineer, Keycloak Maintainer

Red Hat - Germany remote

asch...@redhat.com   

Red Hat GmbH, Registered seat: Werner von Siemens Ring 12, D-85630 Grasbrunn, Germany 
Commercial register: Amtsgericht Muenchen/Munich, HRB 153243,
Managing Directors: Ryan Barnhart, Charles Cachera, Michael O'Neill, Amy Ross
Reply all
Reply to author
Forward
0 new messages