Search code examples
authenticationauth0

Is it possible to use a subdomain login page to authenticate apps on multiple subdomains?


I'm looking to setup a login page on a subdomain for use with Auth0. Is it possible to have that login page serve auth for multiple other subdomains?

For example:

I want login.xyz.com to be the auth page for:

  • dev.xyz.com
  • staging.xyz.com
  • production.xyz.com

Solution

  • It is possible to set up your login page to provide authentication for different subdomains (you could even set it up for different domains). One thing you have to remember is that a user will only have to log in once, and then will use their session among the different subdomains. This is because the user will actually log in to login.xyz.com and the other subdomains will only get a confirmation from your authorization server that the user is authenticated (most probably in the form of an ID token, if you're using OpenID Connect).