首页 > 解决方案 > firebase 管理员:您的应用程序已使用不受支持的 Google Cloud SDK 或 Google Cloud Shell 的最终用户凭据进行身份验证

问题描述

当我尝试使用

admin.auth().getUser(uid);

我收到这个错误。

"errors":[{"message":"您的应用程序已使用来自 Identitytoolkit.googleapis.com 的 Google Cloud SDK 或 Google Cloud Shell 的最终用户凭据进行身份验证。我们建议在 gcloud 中配置 billing/quota_project 设置或通过 auth/impersonate_service_account 设置使用服务帐户。有关服务帐户以及如何在应用程序中使用它们的更多信息,请参阅https://cloud.google.com/docs/authentication/。","domain":" usageLimits","re​​ason":"accessNotConfigured","extendedHelp":" https://console.developers.google.com "}],"status":"PERMISSION_DENIED"}}"' }

在我使用之前它正在工作

export GOOGLE_APPLICATION_CREDENTIALS='../servicekey.json'"

标签: firebasefirebase-authenticationfirebase-admin

解决方案


推荐阅读