You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to create a custom bucket via the firebase-admin npm module and even though my service account 100% has the storage.buckets.create permission (I've even created a custom role and explicitly assigned it this along with having the standard Storage Admin permission too).
I get the following error:
[email protected] does not have storage.buckets.create access to project 265909605284.
I believe this error is not accurate - or I'm doing something really stupid??
Relevant Code:
constadmin=require('firebase-admin');constserviceAccount=require('./storage-service-account.json');admin.initializeApp({credential: admin.credential.cert(serviceAccount),projectId: serviceAccount.project_id,authDomain: 'XXX.firebaseapp.com',storageBucket: 'XXX.appspot.com',});constbucket=admin.storage().bucket('my.custom.bucket');bucket.create()// OR bucket.get({ autoCreate: true });