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'
});
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.
Most helpful comment
Duplicate of #2536
You can use the
options.credentialsobject when instantiating the client. That is expected to be the contents of a JSON service account key file.