Skip to content

Instantly share code, notes, and snippets.

@javebratt
Created June 12, 2017 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javebratt/b1a7188877d9ef7d415dc142e71046ef to your computer and use it in GitHub Desktop.
Save javebratt/b1a7188877d9ef7d415dc142e71046ef to your computer and use it in GitHub Desktop.
firebase.auth().onAuthStateChange( user => {
if (!user){
// No user, send to login.
} else {
// There is a user, check for email verification.
if (user.emailVerified) {
// Email verified, do your thing.
} else {
// No verification yet
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment