Skip to content Skip to sidebar Skip to footer

Is There A Way In Firebase To Get If Email Is Verified?

For now I'm doing like this: firebase.auth().onAuthStateChanged((user) => { if (!user.emailVerified) { //Something } }); But, the problem is I have added this blo

Solution 1:

Anywhere in your page you can do:

firebase.auth().currentUser.emailVerified

To determine the current state. You only need onAuthStateChanged() to monitor when the state changes.

Solution 2:

listener

onIdTokenChanged

to reload

auth.currentUser.reload()
auth.currentUser.getIdToken(true)

Post a Comment for "Is There A Way In Firebase To Get If Email Is Verified?"