I am getting Invalid Dynamic Link when clicking to the Sign-in link received through email. 
actionCodeSettings.url = URL(string: "https://caxxxxxxxxxxxant.page.link") //my domain prefix
actionCodeSettings.handleCodeInApp = true
actionCodeSettings.setIOSBundleID(Bundle.main.bundleIdentifier!
actionCodeSettings.url = URL(string: "https://caxxxxxxxxxant.page.link/open")
with custom url scheme i gave while making Dynamic Link under the domain, it's now navigating me to my app with error 'error in sign-in' by going else part of the below code. *
if Auth.auth().isSignIn(withEmailLink: link) {
guard let email = UserDefaults.standard.value(forKey: "Email") as? String else {
print("Error signing in: email does not exist")
return true
}
}
else{
print("error in sign-in")
}
return false
}
The link I am getting while receiving the dynamic link in app delegate restorationHandler: method is
<https://caxxxxxxxxxxxxant.page.link/?link=https://sxxxx-axxxxt-exxa.firebaseapp.com&isi=14xxxxxx8&ibi=com.cxxxxxr.sxxxxxt&st=Eagle+Eye+Sales+Assistant+App&sd=Now+you+can+get+all+the+Eagle+Eye+documents+and+information+within+a+fingerprint.&cid=5xxxx60xxx558&_osl=https://caxxxxxxxxant.page.link/open&_fpb=CJxxxxxHQg==&_cpt=cpit&_iumenbl=1&_iumchkactval=1&_plt=895&_uit=1062&_cpb=1>
I guess this is because my incoming link doesn't contain email with it.
Please help me, how can I get my link authenticated in Auth.auth().isSignIn(withemailLink : Link) method. How can I get the link with email.
Any help will be appreciated.
First of all, Firebase Auth doesn't support custom FDL domains with paths.
Second, if you want to use a custom FDL domain, you need to set actionCodeSettings.url to a fallback URL in case the user clicks the link on a different device (where the iOS app is not installed). You will need to set the FDL domain caxxxxxxxxxxxant.page.link in actionCodeSettings.dynamicLinkDomain.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With