The firebase documentation is a little vague on setting things up with a custom dynamic link domain.
In a react native app, I can successfully have a passwordless email authentication link sent to the user inbox.
My const actionCodeSettings = {
url: 'https://xxxxxx.com/some-verify-email-redirect-web-page',
// This must be true.
handleCodeInApp: true,
iOS: {
bundleId: 'com.xxxxxx.xxxxxxapp',
},
android: {
packageName: 'com.xxxxxx.xxxxxxapp',
installApp: true,
minimumVersion: '12',
},
dynamicLinkDomain: 'xxxxxx.com',
};
I already authorized my custom domain and was able to create and use dynamic links to the android app.
However, my custom dynamic link domain is xxxxxx.com/app. This means that my app is listening to the prefix /app:
"android": {
"package": "com.xxxxxx.xxxxxxapp",
"versionCode": 1,
"googleServicesFile": "./firebase/google-services.json",
"permissions": ["ACCESS_COARSE_LOCATION", "ACCESS_FINE_LOCATION"],
"intentFilters": [
{
"action": "VIEW",
"data": [
{
"scheme": "https",
"host": "xxxxxx.com",
"pathPrefix": "/app"
}
],
"category": ["BROWSABLE", "DEFAULT"]
}
]
},
The verification link I get looks like this: https://xxxxxx.com?link=https://xxxxxx-app.firebaseapp.com/__/auth/action?apiKey...continueUrl%3Dhttps://xxxxxx.com/app/some-verify-email-redirect-web-page%26lang%3Den&apn=com.xxxxxx.xxxxxxapp&amv=12&ibi=com.xxxxxx.xxxxxxapp&ifl=https://xxxxxx-app.firebaseapp.com/__/auth/action?apiKey...signIn%26oobCode...continueUrl%3Dhttps://xxxxxx.com/app/...
So I'm not surprised my app doesn't detect it as an app link because it's missing the /app
Interestingly enough, if I use the default xxxxxx.page.link domain for this purpose, then at least it tries to open some app, but of course cannot and redirects to the Play Store.
Do I need to create a dynamic link manually on Firebase to handle this custom domain verification link?
Do I need to add something to my intentFilters?
Any experts out there who can help with this? What am I missing?