简体   繁体   English

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

[英]how to send verification mail in firebase and forgot password link in firebase flutter version

how to send verification mail in firebase and forgot password link in firebase flutter version 如何在Firebase中发送验证邮件并在Firebase Flutter版本中忘记密码链接

firebase_auth plugin I don't found any forgot password method is there any other way for both firebase_auth插件,我找不到任何忘记密码的方法,是否有其他两种方法

fire base is providing the option to reset the password of the user this query will send a url for reseting the password to user mail id fire base提供了用于重置用户密码的选项,此查询将发送用于将密码重置为用户邮件ID的网址

var auth = firebase.auth();
var emailAddress = "<Mail_id >";

auth.sendPasswordResetEmail(emailAddress).then(function() {
  // Email sent.
    console.log("welcome")
}).catch(function(error) {
  // An error happened.
});

The method is available in the FirebaseUser , not FirebaseAuth (_auth). 该方法在FirebaseUser可用,而不在FirebaseAuth (_auth)中可用。

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

Looking at current master , I don't think it is implemented yet. 看看当前的master ,我认为它尚未实现。 Perhaps file a feature request in flutter issue tracker ? 也许在Flutter问题跟踪器中提出功能请求?

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

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