在 node.js 中未定义 Firebase createUserWithEmailAndPassword 方法 [英] Firebase createUserWithEmailAndPassword method is undefined in node.js
本文介绍了在 node.js 中未定义 Firebase createUserWithEmailAndPassword 方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
启动有问题..
我初始化了我的 firebase 应用.但是 auth() 不起作用
I initialized my firebase app. But auth() is not working
var auth = firebase.auth();
console.log(auth.createUserWithEmailAndPassword)
createUserWithEmailAndPassword
返回未定义.
它也给出了函数错误
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)
});
错误:
类型错误:auth.createUserWithEmailAndPassword 不是函数
TypeError: auth.createUserWithEmailAndPassword is not a function
有什么问题?
推荐答案
Firebase 3.0.5 for node.js 没有 createUserWithEmailAndPassword 方法,看文档
There is no method createUserWithEmailAndPassword in Firebase 3.0.5 for node.js, look at documentation
这篇关于在 node.js 中未定义 Firebase createUserWithEmailAndPassword 方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文