Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
firebase admin:您的应用程序已使用不受支持的来自Google Cloud SDK或Google Cloud Shell的最终用户凭据进行身份验证_Firebase_Firebase Authentication_Firebase Admin - Fatal编程技术网

firebase admin:您的应用程序已使用不受支持的来自Google Cloud SDK或Google Cloud Shell的最终用户凭据进行身份验证

firebase admin:您的应用程序已使用不受支持的来自Google Cloud SDK或Google Cloud Shell的最终用户凭据进行身份验证,firebase,firebase-authentication,firebase-admin,Firebase,Firebase Authentication,Firebase Admin,当我试图使用 admin.auth().getUser(uid); 我得到了这个错误 “错误”:[{“消息”:"您的应用程序已使用来自Google Cloud SDK或Google Cloud Shell的最终用户凭据进行身份验证,而identitytoolkit.googleapis.com不支持这些凭据。我们建议在gcloud中配置计费/配额项目设置,或通过auth/impersonate_服务_帐户设置使用服务帐户。有关服务帐户以及如何在应用程序中使用它们,请参阅“,”域“:”usage

当我试图使用

admin.auth().getUser(uid);
我得到了这个错误

“错误”:[{“消息”:"您的应用程序已使用来自Google Cloud SDK或Google Cloud Shell的最终用户凭据进行身份验证,而identitytoolkit.googleapis.com不支持这些凭据。我们建议在gcloud中配置计费/配额项目设置,或通过auth/impersonate_服务_帐户设置使用服务帐户。有关服务帐户以及如何在应用程序中使用它们,请参阅“,”域“:”usageLimits“,”原因“:”accessNotConfigured“,”extendedHelp“:”}],“状态“:”权限被拒绝“}}”

它在我使用之前就已经起作用了

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

如果您看到上述错误,SDK将不再加载您的服务帐户。很可能是环境变量配置不正确。如果您看到上述错误,SDK将不再加载您的服务帐户。很可能是环境变量配置不正确。