[英]access google cloud storage with firebase credential
I have a node.js client that uses firebase authentication. 我有一个使用firebase身份验证的node.js客户端。 Now I want to access Google Cloud Storage, however the firebase SDK for node.js does not include GCS.
现在,我想访问Google Cloud Storage,但是用于node.js的firebase SDK不包括GCS。 Using @google-cloud/storage works but only with anonymous access.
使用@ google-cloud / storage可以,但是只能使用匿名访问。 How do I apply the firebase credential to @google-cloud/storage so that GCS access is in the context of the logged-in user?
如何将Firebase凭据应用于@ google-cloud / storage,以使GCS访问处于已登录用户的上下文中?
Node.js is a server that operates in a privileged environment. Node.js是在特权环境中运行的服务器。 The Firebase Admin SDK (aka the Node SDK) talks to other services via a service account.
Firebase Admin SDK(又名Node SDK)通过服务帐户与其他服务对话。
Firebase Authentication enables client-side authentication. Firebase身份验证启用客户端身份验证。 The JavaScript SDK is the client-side SDK.
JavaScript SDK是客户端SDK。
There is no Node.js client SDK for Firebase that accesses Cloud Storage. 没有用于Firebase的Node.js客户端SDK,可以访问Cloud Storage。 Since both the Firebase Admin SDK and the Google Cloud Platform client for Node.js use administrative privileges to access Cloud Storage, it looks like those won't be an option for you either.
由于Firebase Admin SDK和Node.js的Google Cloud Platform客户端都使用管理特权来访问Cloud Storage,因此看起来这些都不是您的选择。
The two options I can think of are: 我能想到的两个选择是:
I admit that neither is trivial, so I hope somebody knows a better solution. 我承认两者都不是小事,所以我希望有人知道更好的解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.