SSO is not working

Hi,

I have 2 applications and I want to implement SSO between these two apps. Here is my setup:

  • Single Tenant
  • Two Auth0 Applications
  • Single username DB on Auth0
  • Custom Auth0 domain on auth.x.com
  • Two React Apps on two domains, app1.x.com, app2.y.com
  • All domains are in the allowed callback urls list in Auth0 Applications

What I expect to have seamless authentication between two Apps. But after I login the app1, app2 also asks for login

Let’s say I logged in to app1. When I try to login to app2, I am redirected to login page on auth.x.com and I can see that “auth0” named cookie is set. But still it is not redirecting me back to app2.

Please help.

Bests
Sukru

I found the problem.

The problem for me was:

I was using prompt=login option for loginWithRedirect. This will always show the login prompt even if there is a valid session on the server. Just removed prompt=login option and it works now.

1 Like