Skip to content

Instantly share code, notes, and snippets.

@Ryan-Gordon
Created March 3, 2018 15:09
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 Ryan-Gordon/736b76f0d0f0711d48722eab3dad0dcd to your computer and use it in GitHub Desktop.
Save Ryan-Gordon/736b76f0d0f0711d48722eab3dad0dcd to your computer and use it in GitHub Desktop.
//Set up a listener for the when the AuthState changes (Login/Logout) and perform some action.
firebase.auth().onAuthStateChanged( user => {
if (user){
this.userProfile = user;
} else {
this.userProfile = null;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment