firebase文档在使用自定义动态链接域进行设置方面有些含糊。
在React Native应用中,我可以成功地将无密码的电子邮件身份验证链接发送到用户收件箱。
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',
};
我已经授权了自定义域,并且能够创建和使用指向Android应用程序的动态链接。
但是,我的自定义动态链接域是xxxxxx.com/app
。这意味着我的应用正在监听前缀/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"]
}
]
},
我得到的验证链接如下: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/...
所以我不奇怪我的应用程序没有将其检测为应用程序链接,因为它缺少/app
有趣的是,如果我为此目的使用默认的xxxxxx.page.link
域,那么至少它会尝试打开一些应用程序,但是当然不能并重定向到Play商店。
我需要在Firebase上手动创建动态链接来处理此自定义域验证链接吗?
我需要添加一些东西到我的intentFilters中吗?
任何专家都可以提供帮助吗?我想念什么?