Redirecting Users to Different Web Applications After Universal Login

Hello Auth0 Community,

I have set up a single Auth0 tenant that serves two distinct web applications. These applications are hosted on different domains, let’s say and

I aim to implement a Universal Login flow using a third URL (let’s say The desired flow is:

  1. User visits
  2. User is redirected to the Auth0 Universal Login Page.
  3. After authentication, based on certain criteria (either the incoming application or user’s app_metadata), the user is directed to either or
  4. The chosen application ( or completes the authentication flow, and the user can then interact with it as an authenticated user.

Currently, using Next.js 13 and Auth0, I’ve been able to achieve the redirection using an Auth0 Action (Step 4). This redirects users to or successfully.

However, I’m having difficulty with the last part of the flow (Step 5). I tried using the “state” query parameter to conclude the authentication process, but I can’t discern what information I need to send/receive to complete the authentication and maintain the user’s authenticated state on or

Could anyone provide insights or guidance on how to successfully finalize this authentication flow?

Thank you in advance!

Hi @leonardo.lombardi,

This is a little difficult to do since the login request specifies the ‘redirect_uri’ (Callback URL), meaning that you will need to preemptively know where the user is going to land at the end of the authentication flow.

For example:


Given that, you could have the user select whether they want to log in to or at the start and have them authenticate that way.

Let me also mention that using Redirect with Actions will redirect the user to your preferred URL. However, to complete the authentication flow, the user must be sent back to the /continue endpoint with the ‘state’ parameter, where they will eventually complete the flow and land on the Callback URL you specified in the ‘redirect_uri’ query parameter in the login request.

See this doc for more information on resuming the authentication flow when redirecting with Actions.


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