angular / angularfire

Angular + Firebase = ❤️
https://firebaseopensource.com/projects/angular/angularfire2
MIT License
7.64k stars 2.2k forks source link

sendEmailVerification() not sending Email #1895

Closed kim-marcel closed 3 years ago

kim-marcel commented 5 years ago

Version info

Angular: 6.0.8

Firebase: 5.5.1

AngularFire: 5.0.2

How to reproduce these conditions

When using the code below no verification-Email is being sent to the newly created user, although the new user is visible in the firebase console.

  emailSignUp(email: string, password: string) {
    this.afAuth.auth.createUserWithEmailAndPassword(email, password).then(
      () => {
        this.verifyEmail();
      }
    );
  }

  verifyEmail() {
    this.afAuth.authState.subscribe(
      (user) => user.sendEmailVerification().then(
        () => console.log('email sent')));
  }

I'm not sure whether this is a bug or I'm doing something wrong, but I've found a couple of examples online that seem to work like this with older versions of angular + angularfire2.

Debug output

No errors are thrown, 'email sent' is logged to console.

Expected behavior

A verification-Email should be sent to the user.

Actual behavior

No Email is being sent.

kim-marcel commented 5 years ago

This could also be a problem in the firebase SDK. I've opened an issue in their repository too.

jamesdaniels commented 3 years ago

Closing as it's not likely an AngularFire issue, if it's still a problem.