【发布时间】:2017-01-13 19:52:02
【问题描述】:
我已经看到很多关于这个的问题,但让我感到困惑的是firebase的documentation x nodejs有一个函数createUserWithEmailAndPassword()。
每次我打印firebase.auth() 它只有这些功能:
{
createCustomToken: [Function],
verifyIdToken: [Function],
INTERNAL:{
delete: [Function],
getToken: [Function],
addAuthTokenListener: [Function],
removeAuthTokenListener: [Function]
}
}
另外,在同一个 nodejs 文档下,firebase.auth() 说:
auth(app) 返回 firebase.auth.Auth
获取默认 App 或给定 App 的 Auth 对象。
用法:
firebase.auth() firebase.auth(app)
所以我假设调用firebase.auth() 将返回firebase.auth.Auth,它应该包含createUserWithEmailAndPassword 函数。
注意
是的,我使用 firebase.initializeApp() 正确初始化了 firebase,它工作正常,我已经在做 database 事务 JSYK。
【问题讨论】:
标签: node.js firebase firebase-authentication