I want to do authentication with firebase. When I want to sign up a user I use the followin code
firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
res.render('signup', { errorMessage: errorMessage });
});
When they succeed to signup, I want to redirect them to the login page but I don't know where to put this code because it's asynchronous.
via tomzinho
No comments:
Post a Comment