单击通过电子邮件收到的登录链接时,我收到了无效的动态链接 [英] I am getting Invalid Dynamic Link when clicking to the Sign-in link received through email
问题描述
单击通过电子邮件收到的登录链接时,我收到了无效的动态链接.
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")
使用我在域下进行动态链接时给出的自定义url方案,现在通过以下代码的其他部分将我导航到错误为登录错误"的应用. *
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
}
我在应用程序委托restoreHandler:方法中接收动态链接时获得的链接是
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.
请帮助我,如何在Auth.auth().isSignIn(withemailLink:Link)方法中对我的链接进行身份验证.如何获得带有电子邮件的链接.
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.
任何帮助将不胜感激.
推荐答案
首先,Firebase Auth不支持带有路径的自定义FDL域.
其次,如果要使用自定义FDL域,则需要将actionCodeSettings.url
设置为后备URL,以防用户单击其他设备(未安装iOS应用)上的链接.您需要在actionCodeSettings.dynamicLinkDomain
中设置FDL域caxxxxxxxxxxxant.page.link
.
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
.
这篇关于单击通过电子邮件收到的登录链接时,我收到了无效的动态链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!