我已经在firebase上创建了新的应用程序,并启用了电子邮件/密码提供商。
var firebase = require("firebase");
var config = {
apiKey: "===========",
authDomain: "========.firebaseapp.com",
databaseURL: "https://------.firebaseio.com",
storageBucket: "-------.appspot.com",
};
firebase.initializeApp(config);
firebase.auth().createUserWithEmailAndPassword("email","password").catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
// ...
});但是我发现firebase.auth().createUserWithEmailAndPassword()不是一个函数。在nodejs和firebasae 3中使用请告诉我哪里做错了
发布于 2016-08-15 05:56:01
目前,Firebase node.js api不允许您创建用户。
如果您稍微深入了解一下firebase.auth()对象,就会发现这主要是为了身份验证而设计的,而不是为了管理用户。在谈到管理用户时,Firebase是为在应用程序端调用而构建的。
firebase.auth():
{createCustomToken: [Function],
verifyIdToken: [Function],
INTERNAL:
{ delete: [Function],
getToken: [Function],
addAuthTokenListener: [Function],
removeAuthTokenListener: [Function] } }https://stackoverflow.com/questions/38944800
复制相似问题