Skip to content

Instantly share code, notes, and snippets.

@hurlatunde
Last active August 28, 2018 06:12
Show Gist options
  • Save hurlatunde/be4e60b820f0b87955c2cede2edb1c21 to your computer and use it in GitHub Desktop.
Save hurlatunde/be4e60b820f0b87955c2cede2edb1c21 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.createUserWithEmailAndPassword(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