Authentication with Firebase 3.0 in node.js

Due to the fact that firebase has been updated to version 3.0, and I need to upgrade to a new version, the problem arose as authentication of my node server. Code is

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);

When starting npm start, the following error appears:

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 authorized to access the specified 
databaseURL and is from the correct project.

But I got all the settings information on my console in firebase.

+4
source share
1 answer

. , , "" . Google Cloud IAM ( Firebase, "" ) .

-, Firebase, . Google, : https://groups.google.com/forum/#!topic/firebase-talk/i2sqxJIRzno

+9

All Articles