Unique login for multiple clients in KeyCloak

Viewed 5283

In Keycloak, is it possible to have only one login for all the clients in the same realms? I have configured the server (from the admin console) in this way:
- create a new realm (let's call MyRealm);
- create two different clients (Client1 and Client2)
- create a user (Alice)
I have tested the two clients individually, and they works fine (the default keycloak login page appear and if I provide the credentials the browser redirects me correctly); the problem is that when I am logged in in Client1, and go (from the same browser) to Client2 the login page re-appers. Is it possible to configure the server in a way that I have to log in only with one client, and then I am authenticated also in all other Realm's clients? Thanks.

2 Answers

I solved this problem configuring only one client (named UniqueClient) from Keycloak admin console; then I modified the two java applications (Client1 and Client2) and now all of them are pointing to UniqueClient (in their keycloak.json there is 'clientId': 'UniqueClient'): in this way when I start one of them the keycloak login page appears, and if I log in, I'm logged in also for the other application (unitil the session expires);

Related