/* eslint-disable */const functions = require('firebase-functions');const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
exports.addUser = functions.auth.user().onCreate(event => { const user = event.data; return admin.auth().updateUser(user.uid, { disabled: true });});Error: An internal error has occurred. Raw server response: "{"error":{"errors":[{"domain":"usageLimits","reason":"accessNotConfigured","message":"Access Not Configured. Google Identity Toolkit API has not been used in project 892464895067 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/identitytoolkit/overview?project=892464895067 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.","extendedHelp":"https://console.developers.google.com/apis/api/identitytoolkit/overview?project=892464895067"}],"code":403,"message":"Access Not Configured. Google Identity Toolkit API has not been used in project 892464895067 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/identitytoolkit/overview?project=892464895067 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."}}" at FirebaseAuthError.Error (native) at FirebaseAuthError.FirebaseError [as constructor] (/user_code/node_modules/firebase-admin/lib/utils/error.js:25:28) at new FirebaseAuthError (/user_code/node_modules/firebase-admin/lib/utils/error.js:90:23) at Function.FirebaseAuthError.fromServerError (/user_code/node_modules/firebase-admin/lib/utils/error.js:114:16) at /user_code/node_modules/firebase-admin/lib/auth/auth-api-request.js:350:45 at process._tickDomainCallback (internal/process/next_tick.js:129:7)--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/8bac2758-336e-4c58-a742-c4233df31bbf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/8bac2758-336e-4c58-a742-c4233df31bbf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
var admin = require("firebase-admin");
var serviceAccount = require("path/to/serviceAccountKey.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://<DATABASE_NAME>.firebaseio.com"
});-- Sameer Siruguri President, Digital Strategies http://www.dstrategies.org/ @digstrategies cell: 650 996 0998 --
I should note that the error message shows me a project ID that isn't what I see in the console in a browser. I feel this indicates some sort of outdated Node module.-- Sameer Siruguri President, Digital Strategies http://www.dstrategies.org/ @digstrategies cell: 650 996 0998 --On Wed, Jun 21, 2017 at 3:49 PM, Sameer Siruguri <sam...@dstrategies.org> wrote:I believe an equivalent path should be to use `firebase login` to get what is probably an oAuth token or JWT for an admin account.Another person on my team that does that is able to get local emulation to work - so I suspect we either have a mismatch in some node module version or some GCE configuration.What version of firebase-admin is recommended/required for local emulation to work?-- Sameer Siruguri President, Digital Strategies http://www.dstrategies.org/ @digstrategies cell: 650 996 0998 --
--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/2yw4gLI7F-0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/6153fd86-62d4-4768-9697-f6da40ca3af6%40googlegroups.com.