I’m integrating the new Universal Login with MFA in a React SPA (following the directions in Auth0 React SDK Quickstarts: Login) and I’m hitting a random “issue”.
When you open the app and you’re not authenticated, the app renders a view that shows a simple message and redirects automatically to the login page using the loginWithRedirect()
function.
Then, the logout functionality, uses the logout({ returnTo:
${window.location.origin}/login })
function.
The problem is that after logout, when it redirects to the login form again, it sometimes shows the username / password form, and sometimes goes directly to the OTP form without requiring credentials again. Like if the Auth0 session would still be alive.
This behavior is not consistent, sometimes happens, sometimes it goes to the username/password form as expected.
Not sure if this is a bug of the Universal Login or if this is something I can control from my code, since it happens on the Auth0 domain, not in my app’s domain.
Any clues?