Skip to content

Instantly share code, notes, and snippets.

@hurlatunde
Created August 28, 2018 13:01
Show Gist options
  • Save hurlatunde/3ec004a85f84cc9580c21e368a29d871 to your computer and use it in GitHub Desktop.
Save hurlatunde/3ec004a85f84cc9580c21e368a29d871 to your computer and use it in GitHub Desktop.
//Firebase Auth instance
const auth = firebase.auth();
const email = fornData.email_address;
const password = fornData.password;
const promise = auth.signInWithEmailAndPassword(email, password);
promise.then(function (user) {
// get the current loggeg in users details
console.log(user);
})
promise.catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
// ...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment