Skip to content

Instantly share code, notes, and snippets.

@smartITNinja
Created May 2, 2018 12:54
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 smartITNinja/9902afd4dd69e7c4b082f59214cd2d57 to your computer and use it in GitHub Desktop.
Save smartITNinja/9902afd4dd69e7c4b082f59214cd2d57 to your computer and use it in GitHub Desktop.
How do I detect if a user is already logged in Firebase?
var config = {
apiKey: "....",
authDomain: "...",
databaseURL: "...",
projectId: "..",
storageBucket: "..",
messagingSenderId: ".."
};
firebase.initializeApp(config);
$( document ).ready(function() {
console.log( "testing.." );
var user = firebase.auth().currentUser;
console.log(user);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment