【问题标题】:how to send verification mail in firebase and forgot password link in firebase flutter version如何在firebase中发送验证邮件并在firebase颤振版本中忘记密码链接
【发布时间】:2018-03-17 23:35:12
【问题描述】:

如何在firebase中发送验证邮件并在firebase flutter版本中忘记密码链接

firebase_auth 插件我没有找到任何忘记密码的方法,还有其他方法吗

【问题讨论】:

    标签: dart firebase-authentication flutter


    【解决方案1】:

    current master,我觉得还没有实现。也许在flutter issue tracker 中提出功能请求?

    【讨论】:

      【解决方案2】:

      fire base 提供重置用户密码的选项 此查询将发送一个用于将密码重置为用户邮件 ID 的 URL

      var auth = firebase.auth();
      var emailAddress = "<Mail_id >";
      
      auth.sendPasswordResetEmail(emailAddress).then(function() {
        // Email sent.
          console.log("welcome")
      }).catch(function(error) {
        // An error happened.
      });
      

      【讨论】:

        【解决方案3】:

        该方法在FirebaseUser 中可用,而不是FirebaseAuth (_auth)。

        await _auth.createUserWithEmailAndPassword(
          email: _userEmail,
          password: _userPassword
        ).then((FirebaseUser user) {
          // upon success, send email verification
          user.sendEmailVerification();  
          ...
        })
        .catchError(...);
        

        【讨论】:

          猜你喜欢
          • 2017-08-05
          • 2021-02-03
          • 1970-01-01
          • 2018-12-30
          • 1970-01-01
          • 2020-09-23
          • 2012-09-21
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多