相关疑难解决方法(0)

Firebase的SigningError getSignedUrl()

我正在尝试使用file.getSignedUrl()通过Google Cloud Functions(Nodejs)从Firebase Storage获取下载URL.我在Cloud Functions控制台中收到此错误:

{ SigningError: A Forbidden error was returned while attempting to retrieve an access token for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have the correct permission scopes specified. Permission iam.serviceAccounts.signBlob is required to perform this operation on service account projects/myapp-cd94d/serviceAccounts/myapp-cd94d@appspot.gserviceaccount.com.
    at SigningError (/user_code/node_modules/@google-cloud/storage/build/src/file.js:58:9)
    at authClient.sign.then.catch.err (/user_code/node_modules/@google-cloud/storage/build/src/file.js:1019:22)
    at process._tickDomainCallback (internal/process/next_tick.js:135:7) name: 'SigningError' }
Run Code Online (Sandbox Code Playgroud)

我将代码从添加Firebase Admin SDK复制到您的服务器文档中.serviceAccountKey.json我的functions文件夹里有我的.firebase …

firebase google-cloud-functions firebase-storage

13
推荐指数
2
解决办法
2534
查看次数