I am getting Invalid Dynamic Link when clicking to the Sign-in link received through email

ε祈祈猫儿з 提交于 2020-01-25 08:24:24

问题


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!
  • But when I provide the url as :
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.


回答1:


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.



来源:https://stackoverflow.com/questions/59647529/i-am-getting-invalid-dynamic-link-when-clicking-to-the-sign-in-link-received-thr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!