繁体   English   中英

我正在尝试将Firebase电子邮件验证链接验证添加到我的应用中,但出现错误“无法读取null的电子邮件属性”

[英]I am trying to add firebase email varification link varification to my app but getting error “can not read email propperty of null”

我正在尝试将Firebase电子邮件验证链接验证添加到我的应用程序,但出现错误cannot read email property of null

我尝试按照网络上的firebase文档进行操作,但无法找到在何处以及如何实施该解决方案的完整解决方案

 var actionCodeSettings = {
  url: 'campatron.com' + firebase.auth().currentUser.email,
  handleCodeInApp: true,
  // When multiple custom dynamic link domains are defined, specify which
  // one to use.
  dynamicLinkDomain: "example.page.link"
};
firebase.auth().currentUser.sendEmailVerification(actionCodeSettings)
  .then(function() {
    // Verification email sent.
  })
  .catch(function(error) {
    // Error occurred. Inspect error.code.
  });

currentUser属性尚未初始化,这意味着在您到达此代码时,您的用户尚未登录。 您的应用在哪里调用这段代码?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM