为什么我的Firebase请求返回为500(内部服务器错误)?
问题描述:
我有以下代码不执行(我得到500内部服务器错误)。为什么我的Firebase请求返回为500(内部服务器错误)?
我做错了什么?
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);
})
});
你可以发表你的console.log(错误)的输出? – pupuupup
没有输出。 npm start不运行。 – huzal12