Google-cloud-node: Allow providing a service account directly for storage object

Created on 21 Aug 2017  路  1Comment  路  Source: googleapis/google-cloud-node

In short, for a specific use case for a project, I'm handling multiple firebase accounts and the current setup stores the service accounts in a database instead of using the file system.

I need to be able to supply the service account directly to the storage constructor instead of specifying the file name as suggested in the docs:

 var gcs = storage({
   projectId: 'grape-spaceship-123',
   keyFilename: '/path/to/keyfile.json'
 });
question

Most helpful comment

Duplicate of #2536

You can use the options.credentials object when instantiating the client. That is expected to be the contents of a JSON service account key file.

>All comments

Duplicate of #2536

You can use the options.credentials object when instantiating the client. That is expected to be the contents of a JSON service account key file.

Was this page helpful?
0 / 5 - 0 ratings