We are developing a suite of separate SPA applications where each one lives on a subdomain with a common parent domain.
app1.domain.com
app2.domain.com
We want to avoid customers having to sign in to each app separately. So we want to be able to sign in once to one app and remaining signed in when visiting the other apps. Similarly, signing out of one would sign out in the others.
Based on my research of the Auth0 docs, this seemed to be possible with a custom domain. So changed our plan, added the custom domain auth.domain.com
and created a test SPA app that could log in. I then created two subdomains and pointed them both at the app.
Logging in to app1.domain.com
worked. The auth0.{clientid}.is.authenticated
cookie was created. However, the cookie’s domain was app1.domain.com
, not .domain.com
as I’d hoped.
I then tried visiting the app2.domain.com
and confirmed that the cookie definitely wasn’t there and I wasn’t logged in.
Is there any way to configure Auth0 to keep a user logged in across all the subdomains?