I have the following code that does not execute (I get back 500 internal server error).
What did I do wrong?
app.post('/api/sign-in', function(req, res, next) {
//auth
firebase.auth().signInWithEmailAndPassword(req.query.username, req.query.password)
//get back promise, log user object's email address
.then(function (user) {
console.log(user.email)
})
//log error
.catch(function(error) {
console.log(error);
})
})
via huzal12
No comments:
Post a Comment