Firebase createUserWithEmailAndPassword方法在node.js中未定义 [英] Firebase createUserWithEmailAndPassword method is undefined in node.js
问题描述
我初始化了我的Firebase应用程序。但是auth()不起作用。
$ p $ var auth = firebase.auth();
console.log(auth.createUserWithEmailAndPassword)
它也给函数错误 错误: TypeError:auth.createUserWithEmailAndPassword不是函数 是什么问题? createUserWithEmailAndPassword
返回undefined。
pre $ var $ email =mail @ mail.com
var password = 123
var auth = firebase.auth();
auth.createUserWithEmailAndPassword(email,password).then(function(result){
console.log(result)
})。catch(function(error){
console。日志(错误)
});
<解决方案
在Firebase 3.0.5中,对于node.js,没有方法createUserWithEmailAndPassword,请参阅文档
There is a problem in starting..
I initialized my firebase app. But auth() is not working
var auth = firebase.auth();
console.log(auth.createUserWithEmailAndPassword)
createUserWithEmailAndPassword
returns undefined.
It also gives function error
var email = "mail@mail.com"
var password = 123
var auth = firebase.auth();
auth.createUserWithEmailAndPassword(email, password).then(function(result) {
console.log(result)
}).catch(function(error) {
console.log(error)
});
The error:
TypeError: auth.createUserWithEmailAndPassword is not a function
What is the problem?
There is no method createUserWithEmailAndPassword in Firebase 3.0.5 for node.js, look at documentation
这篇关于Firebase createUserWithEmailAndPassword方法在node.js中未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!