I integrated my flutter application with firebase and i want user to reset their password and i have my function as shown below:
This function is working fine might be, but it's sending email very late like after 5 minutes or more. Please help me to get this fixed. I also wanna know if i am doing this right or not.
**It sends verification email but sends it very late **
await FirebaseAuth.instance
.sendPasswordResetEmail(email: email)
.then((_) {
setState(() {
_isloading = false;
});
Navigator.of(context).pushNamed(EmailSuccessPage.routeName,
arguments: {'emailType': 'Reset'});
}).catchError((error) {
setState(() {
_isloading = false;
});
if (error.code == 'ERROR_USER_NOT_FOUND') {
_showAlertDialog("No user associated with that Email");
}
if (error.code == 'ERROR_INVALID_EMAIL') {
_showAlertDialog("Invalid Email");
}
});
I remember when I was using this feature on an android studio. The problem was the same and I checked it right now the problem is still the same. What I think is the problem is with the firebase servers which send late emails.
There is no way to increase it because if you do without code and just go to firebase authentication and send the rest password link it also takes time of 4 to 5 minutes.
So what I suggest you is to enable user to enter their dashboard and if the user can't verify its email with in an hour, popup a message which shows verification is required.