Reputation: 362
im using firebase auth sendSignInLinkToEmail()
with universal links, not dynamic links.
When i get an email, i click the email sign in link on my iPhone, but it opens my website, instead of opening my iOS App.
the links looks like https://app.mydomain.com/__/auth/links?link=https://mydomain.firebaseapp.com/__/auth/action?apiKey%3DAIza...C8_X8%26mode%3DsignIn%26oobCode%3DQC...FzuA%26continueUrl%3Dhttps://app.mydomain.com%26lang%3Den
mydomain
and myteamid
are replaced accordingly.
why is the link not deep linking and opening my iOS app?
"react-native: "0.73.0"
firebase,
Email link (passwordless sign-in
Enabled.react-native code
const actionCodeSettings = {
url: 'https://app.mydomain.com',
handleCodeInApp: true,
iOS: {
bundleId: 'com.mydomain.main'
},
android: {
packageName: 'com.mydomain.main',
installApp: true,
minimumVersion: '1'
},
linkDomain: 'app.mydomain.com'
}
await sendSignInLinkToEmail(auth, email, actionCodeSettings)
Appdelegate.mm, followed: Universal Deep Linking in react native 0.73
myapp.entitlements
<key>com.apple.developer.associated-domains</key>
<array> <string>applinks:app.mydomain.com</string></array>
following: https://firebase.google.com/docs/auth/ios/email-link-migration
5.1. apple-app-site-association verified app.mydomain.com
using https://branch.io/resources/aasa-validator/
{
"applinks": {
"apps": [],
"details": [
{
"appID": "myteamid.com.mydomain.main",
"paths": [
"NOT /__/auth/action/",
"NOT /__/auth/handler/",
"NOT /_/*",
"/*"
]
}
]
}
}
5.2. Configure your project to use the new links. ran the script, Response 200 and
ProjectConfig {
smsRegionConfig: {},
multiFactorConfig_: MultiFactorAuthConfig {
state: 'DISABLED',
factorIds: [],
providerConfigs: []
},
mobileLinksConfig: { domain: 'HOSTING_DOMAIN' }
}
Upvotes: 0
Views: 28