Property ‘sendEmailVerification’ does not exist on type ‘Promise<User>’.ts(2339)

Published

I have this error :

Property 'sendEmailVerification' does not exist on type 'Promise<User>'.ts(2339)

my code :

// Send email verfificaiton when new user sign up
  SendVerificationMail() {
    return this.afAuth.currentUser.sendEmailVerification()
    .then(() => {
      this.router.navigate(['verify-email-address']);
    })
  }

I don’t know the origin of the error and what am I missing?

Source: New feed
Source Url Property ‘sendEmailVerification’ does not exist on type ‘Promise<User>’.ts(2339)

Published
Categorized as angularjs, firebase, firebase-authentication

Answers

Not sure if you’ve managed to solve this?
I had this same issue and I fixed by doing this:

SendVerificationMail() {
return this.ngFireAuth.currentUser.then(u => u.sendEmailVerification())
.then(() => {
this.router.navigate([‘verify-email’]);
})
}


dcr97

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq