I am trying to send a reset password link using firebase in ionic application…but when i do this…it shows the following error
Error Message: Object { code: “auth/internal-error”, message: "{“error”:{“errors”:[{“domain”:“glob…”, stack: “” }
The code is below
async resetPassword(user:User){
const reset = await this.afauth.auth.sendPasswordResetEmail(user.email)
.then(function(reset){
if(reset){
this.navCtrl.push(ResetPage);
this.toast.create({
'message':"Password reset email has been sent to your mail",
duration:5000,
}).present();
}else{
console.log('Error while sending Reset link email');
}
},function(error){
console.log("Error Message:",error);
});
}
it directly gets into else part…but when i tried to print the user email id its printing the user email id in console…like i did
let email = user.email;
console.log(email);
Anyhelp thanks…