Sharing autentication beetween different domain

Hi, my company has multiple top domains, eg.

  • foo.com
  • bar.net
  • baz.org

I have created a subdomain for each authentication domain:

  • auth.foo.com
  • auth.bar.net
  • auth.baz.org

and behind each subdomain there is the same keycloak instance.

The authentication works as long as the user stays within the same top domain but as soon as the user changes the top domain he’s in he’s logged out.

Is there a way for sharing the authentication among multiple domains?

The main issue is that the cookies are not shared among the different domains.

Curious if and how this issue was resolved?

I cannot resolve it with keycloak… I’ve made a workaround in client applications. This is a script who shares via post messages cookie values

Hi @cesco69 , how did you resolved the issue on client application?
did it work in incognito modes? especially in iFrames, if you have any in your project.