New Universal Login — SPA redirects back to login page immediately after successful authentication

Application type: Single Page Application (auth0-spa-js)

Login type: New Universal Login (recently migrated from Classic Universal Login)


Description

We recently migrated our SPA from Classic Universal Login to New Universal Login by setting custom_login_page_on: false and cross_origin_authentication: false. After migration, users are being redirected back to the login page immediately after a successful login instead of being taken to the application.

If the user waits approximately 40 seconds after logging out before attempting to log in again, the login succeeds without any issue. But logging in immediately after a logout causes the session to reset and the user is returned to the login page.

Questions:

  1. What are the known causes for a login loop after migrating from Classic to New Universal Login?

  2. Is there any additional configuration required for auth0-spa-js when switching from cross-origin authentication to the authorization_code + PKCE redirect flow?

  3. Why would a session be terminated within seconds of a successful login, and what should be checked to prevent this?