0

I've noticed that I am no longer receiving either email verification or password reset emails from Firebase.

My project is built on Flutter & these features were once working.

For troubleshooting purposes, I updated my project today, both the Flutter version & the various libraries. Still no luck.

I then created a brand new app from scratch, and even copied over all the libraries I am using and my new project works. I get both emails.

Has anyone else encountered this? Best place to start for additional troubleshooting?

Here's my Reset Password code:

class AuthenticationService {
  final _auth = FirebaseAuth.instance;
  late AuthStatus _status;

  Future<AuthStatus> resetPassword({required String email}) async {
    await _auth
        .sendPasswordResetEmail(email: email)
        .then((value) => _status = AuthStatus.successful)
        .catchError(
            (e) => _status = AuthExceptionHandler.handleAuthException(e));
    return _status;
  }
}

// then on my UI screen I call this
final _status = await _authService.resetPassword(
    email: _emailTextEditingController!.text.trim());
if (_status == AuthStatus.successful) {
  print('SUCCESS!!!');
} else {
  final error = AuthExceptionHandler.generateErrorMessage(_status);
  print('error -> $error');
}

I am always getting Success so I'm not sure what else to try.

To note, these emails ARE NOT going into a SPAM folder.

I've tested thoroughly, both from my app and from the Firebase Users portal & the emails are just not being sent out or received AT ALL.

Luke Irvin
  • 1,179
  • 1
  • 20
  • 39
  • Most likely these emails end up in your span folder or get dropped as spam somewhere along the way before reaching your mailbox. See https://stackoverflow.com/questions/72922475/why-did-this-code-fail-to-send-password-reset-link-in-firebase-reactjs/72922603#72922603 for some workarounds. – Frank van Puffelen Jul 30 '22 at 03:45
  • Hey Frank. Currently, they are not ending up in my SPAM folder or any other folder. They just aren't sending. Even when sending them from the Firebase Users area on the site. – Luke Irvin Jul 30 '22 at 16:34
  • If `sendPasswordResetEmail` completes successfully (so if its promise resoles and your `then` gets called), the email almost certain was sent (as otherwise you'd typically see the promise rejects and your `catch` being called). So if they're not in your spam folder, they might still be getting caught by another spam filter along the way (which ones there is/are depends on your mail provider). I still recommend the workarounds that are described in the answer I linked, as they are the common workarounds - as they detach your email further from the email from all of the other projects. – Frank van Puffelen Jul 30 '22 at 19:00

0 Answers0