Deep link from universal login page

Good morning,

I’m using the Classic Universal Login page with WebAuth to authenticate users in my React Native application.

On the login page, I have a “Forgot username?” button. For accessibility reasons, I want this button to open a native flow in my app instead of navigating to a web page.

I’ve tried using a custom URL scheme. However, when the login page redirects to my app, Auth0 returns “Invalid callback URL”, even though I’ve added the URL to the list of allowed callback URLs.

The only workaround I’ve found is:

  1. Trigger the redirect.
  2. Catch the exception returned by WebAuth.
  3. Check whether the exception contains my forgot-username URL.
  4. Close the WebAuth page.
  5. Launch the native flow.

This works, but it feels very hacky and I’m worried it could break in a future update.

I also tried using Universal Links. The app correctly receives the link and opens the native flow, but I couldn’t find a way to programmatically close the WebAuth page afterward.

Has anyone implemented something similar? Is there a recommended way to launch a native flow from Classic Universal Login and properly dismiss the WebAuth browser without relying on exceptions?

Thank you for now, any suggestion is highly appreciated

Hi @csanna

Welcome to the Auth0 Community!

I understand that you are looking to have the “Forgot username?” button open a native flow in your application instead of navigating to a web page, using Classic Universal Login page with WebAuth.

Please allow us some time to research and we will update you with new information in a timely manner.

Thank you!
Gerald