For instance, this code works only when GOOGLE_APPLICATION_CREDENTIALS is set to a valid credentials file, even though I'm logged into my Firebase project and my gcloud project:
If that env var is not set, I get this error:
Error listing users: FirebaseAuthError: Failed to determine project ID for Auth. Initialize the SDK with service account credentials or set project ID as an app option. Alternatively set the GOOGLE_CLOUD_PROJECT environment variable.But setting GOOGLE_CLOUD_PROJECT is not enough either. When I do that, I get:
Error listing users: FirebaseAuthError: //cloud.google.com/docs/authentication/. Raw server response: "{"error":{"code":403,"message":"Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the identitytoolkit.googleapis.com. We recommend configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/.","errors":[{"message":"Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the identitytoolkit.googleapis.com. We recommend configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/.","domain":"usageLimits","reason":"accessNotConfigured","extendedHelp":"https://console.developers.google.com"}],"status":"PERMISSION_DENIED"}}" at FirebaseAuthError.FirebaseError [as constructor] (/c/dss/Product/Horizon/horizon/packages/renderer/node_modules/firebase-admin/lib/utils/error.js:43:28) at FirebaseAuthError.PrefixedFirebaseError [as constructor] ...As I said though, all other Firebase admin features seem to work fine with ADC; they automatically pick up the current project and my logged in account.
Is it just me or is admin.auth() not able to pick up the default credentials?
--
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-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/965fa5cd-dd5f-44bc-84b3-3c089cb2bdd7n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/58d2ff24-b7b6-4e6a-81f6-79389c24edf0n%40googlegroups.com.
because for some unknown reason they don't automatically sync. Oh well.gcloud config set project $fb_project
firebase use $fb_project
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/fUB2m4UYG8s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CAHafJBo7V7csPp6fTRBsYRJMB-a5v2pe13WvANuvN1PAFiRexA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CAManQ0hkpb9oBqoZr2qtJO9xq-hLX%3D1TBS8ExYdB%3D1jyutcWzg%40mail.gmail.com.