Problem statement
We have an Android application. When users register, it sends a verification email with a link redirecting to my-app://my-app.com/welcome
. This works fine when they click the link from the device where the app is installed, but not if they click on the link from their laptop.
Solution
Here is the solution:
- In the Auth0 Dashboard, configure the Verification Email Template to redirect to a URL that uses the https scheme
https://my-app.com/welcome
. - Set up an intent filter in your application that triggers your application to open when a user visits
https://my-app.com/welcome
from the browser on a device where the application is installed. Note, you can still use the custom scheme for your application callback as a part of the login flow. App Links supports configuring multiple hosts:https://developer.android.com/training/app-links/verify-android-applinks#multi-host
- As a part of a web application, host a webpage on
https://my-app.com/welcome
so that users can be redirected to the browser on any device, regardless of whether the application is installed.