Does not show user login prompt anymore after the first logging in

I am using auth0 authentication for a React app. I had to type in my email and password for the very first log in to the app. After that it does not ask for log in anymore when I log out from the app. It automatically logs me in when I click on the login button. If I clear the cache of the browser then it asks for the log in information but once I log in I face the same problem. I cannot switch user unless I clear the cache of the browser.

If I change the tenant information to an older tenant that I created a few months back then it shows the login prompt again. I created the tenant for this app yesterday. Not sure what is going on. Any help would be appreciated.

Auth0 introduced Seamless Single Sign On a little while ago, and disabling it is only possible on older tenants.

Seamless SSO means your users don’t have to enter their credentials again if you hook up multiple apps to your Auth0 tenant. However, you do need to make sure to not just end their application session, but also their Auth0 session. It’s just a quick redirect back to Auth0:

I am using <a href="https://tenant-name.auth0.com/v2/logout" onClick={this.props.auth.logout}> <i className="fa fa-sign-out fa-fw" /> Logout </a> to logout and I want to redirect to http://localhost:3000 or https://subdomain.example.com after logout. I added these two URLs to the Allowed Logout URLs at the Tenant Settings and it always redirects to the first one typed in the settings. Adding those to the Application settings does not work.

You need to tell Auth0 where to redirect to with the returnTo parameter. For example:

https://YOUR_AUTH0_DOMAIN/v2/logout?returnTo=http%3A%2F%2Fwww.example.com

Only the values you add to your Allowed Logout URL field are allowed.

1 Like

This solves my problem. Thanks a lot.

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