I exploit Firebase Authentication with e mail hyperlinks (passwordless hyperlink, password reset, e mail verification) and a customized Firebase Dynamic Hyperlinks area set for dynamic hyperlinks.
In response to Firebase Documentation, I ought to migrate from the Firebase Dynamic Hyperlinks Area to the Firebase Internet hosting Area or proceed utilizing the customized Firebase Dynamic Hyperlinks area:
If you would like to proceed utilizing any of your customized Firebase Internet hosting domains and even your customized Firebase Dynamic Hyperlinks area to be your new related area, utilizing the directions within the Customise Cellular Hyperlinks part, adapt the steps to match the meant area you want to make use of.
If I perceive the documentation accurately, I can configure the Firebase undertaking to both use HOSTING_DOMAIN
or FIREBASE_DYNAMIC_LINK
:
const updateRequest = {
mobileLinksConfig: {
area: 'HOSTING_DOMAIN'
}
}
const updateProjectConfig = () => {
projectConfigManager.updateProjectConfig(updateRequest)
.then((response) => {
// up to date undertaking config
}).catch((error) => {
console.log('Error updating the undertaking:', error);
});
}
I need to maintain utilizing the customized area, so I have never modified the configuration.
Now, for the cell app code, I ought to exchange the dynamicLinkDomain
property with linkDomain
within the ActionCodeSettings
:
Re-use your customized Firebase Dynamic Hyperlinks area.
You possibly can re-use any of your Firebase Dynamic Hyperlinks domains as your customized area. Nevertheless, any Firebase Dynamic Hyperlinks performance will not be supported (for instance, customers can’t be redirected to the app retailer if app is not put in on their machine).
Ship an authentication hyperlink to the person’s e mail tackle with an up to dateActionCodeSettings
object with a customized area aslinkDomain
.
let actionCodeSettings = ActionCodeSettings()
actionCodeSettings.url = URL(string: "https://www.instance.com")
// The sign-in operation has to all the time be accomplished within the app.
actionCodeSettings.handleCodeInApp = true
actionCodeSettings.setIOSBundleID(Bundle.primary.bundleIdentifier!)
actionCodeSettings.linkDomain = "customized.area"
Auth.auth().sendSignInLink(toEmail: e mail,
actionCodeSettings: actionCodeSettings)
Nevertheless, after I try this, the Firebase would not use the customized dynamic hyperlinks area however the default area (web page.hyperlink
) we used earlier than setting the customized one. So it looks as if the linkDomain
property would not do something, or possibly I am doing it flawed.
Is it potential that linkDomain
is meant to work with internet hosting domains solely, and with that, I ought to configure undertaking for cell hyperlinks as HOSTING_DOMAIN
however use the customized area?