【发布时间】:2016-06-01 14:27:48
【问题描述】:
由于firebase已经升级到3.0版本,我需要迁移到新版本,所以我的节点服务器的身份验证出现了问题。代码是这样的
var firebase = require('firebase');
var config = {
apiKey: "<minha apiKey>",
authDomain: "<meu domínio de autenticação>",
databaseURL: "<url do banco>",
storageBucket: "<minha storageBucket>",
serviceAccount: "<nome do arquivo gerado pela conta de serviço>.json"
};
firebase.initializeApp(config);
运行npm start时出现如下错误:
FIREBASE WARNING: Provided authentication credentials are invalid.
This usually indicates your FirebaseApp instance was not initialized
correctly.
Make sure your apiKey and databaseURL match the values provided for your
app at 'https://console.firebase.google.com/', or if you're using
a service account, make sure it's authorized to access the specified
databaseURL and is from the correct project.
但我在我自己的控制台上的 firebase 上获得了所有设置信息。
【问题讨论】:
标签: javascript node.js firebase