siva kumar
siva kumar

Reputation: 2925

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_auth plugin I don't found any forgot password method is there any other way for both

Upvotes: 4

Views: 5965

Answers (3)

Feu
Feu

Reputation: 5780

The method is available in the FirebaseUser, not FirebaseAuth (_auth).

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

Upvotes: 6

krishna
krishna

Reputation: 91

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

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

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

Upvotes: 9

aptik
aptik

Reputation: 613

Looking at current master, I don't think it is implemented yet. Perhaps file a feature request in flutter issue tracker?

Upvotes: 0

Related Questions