Auth0 domain cookie session issue with subdomains

Hello,

We are trying to setup SSO authentication in our website, we have a particular escenario where we use the same app but with different access sub domains, like this:

Domain: example.com

Site A → a.example.com

Site B → b.example.com → proxy to a.example.com/path

We want to authenticate an user in a.example.com and reuse the same session in all subdomains.

However we are struggling with this setup because for some reason the user session information is lost when we change of subdomain, example:

Site A → a.example.com: User is logged and session is created

Site B → b.example.com: User change to site B and user information is lost (domain session cookie is still present)

Site A → a.example.com: User return to site A and user information is available again.

We added the cookie domain .example.com in our frontend client but still we have some issues when the app tries to access the user information in a different subdomain.

Has anyone done something similar?

what is the cookie domain value?

The cookie domain was like this .example.com, however, we could figure out what was the issue, it was related to some missing config in the frontend client and redirect rules in the loadbalancer.

Thanks!

1 Like

Hey @carlosn glad you hear you were able to get this sorted, and thanks for following up with the community!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.