sendPasswordResetEmail static method

Future<bool> sendPasswordResetEmail(
  1. String email,
  2. dynamic authProvider
)

Implementation

static Future<bool> sendPasswordResetEmail(String email, AuthProvider authProvider) async {
  bool isPasswordResetEmailSent = false;
  try{
    await FirebaseAuth.instance.sendPasswordResetEmail(email: email);
    isPasswordResetEmailSent = true;
  }on FirebaseAuthException catch(e){
    authProvider.authExceptionType = AuthExceptions.typeOf[e.code];
  }catch(e){
    printToConsole("Exception in FirebaseManageUsers.sendPasswordResetEmail: ${e.toString()}");
    authProvider.authExceptionType = AuthExceptionType.unknown;
  }
  return isPasswordResetEmailSent;
}