Repository navigation
How to add new user with role(editor) in Firebase project settings (Users and permissions) with Firebase Tools #6552
|
I need to add new user with role(editor) in Firebase project settings (Users and permissions) using Firebase Tools. |
Replies: 1 comment
|
firebase-tools can't do either of these two, so you'll need a different tool for the first one and the console for the second. For the editor role, use gcloud. Firebase project members are just Google Cloud IAM bindings, and this is the command: gcloud projects add-iam-policy-binding PROJECT_ID --member=user:EMAIL --role=roles/editorThat works fine in CI. The service account running the script needs permission to set IAM policies on the project, resourcemanager.projects.setIamPolicy, which the Project IAM Admin role covers. The .p8 file is the one that can't be scripted. There is no firebase-tools command and no public API for uploading an APNs key. It has to be uploaded once in the Firebase console, under Project settings, Cloud Messaging, in the Apple app section. After that one manual upload, everything else in your CI flow can stay automated. |
firebase-tools can't do either of these two, so you'll need a different tool for the first one and the console for the second.
For the editor role, use gcloud. Firebase project members are just Google Cloud IAM bindings, and this is the command:
That works fine in CI. The service account running the script needs permission to set IAM policies on the project, resourcemanager.projects.setIamPolicy, which the Project IAM Admin role covers.
The .p8 file is the one that can't be scripted. There is no firebase-tools command and no public API for uploading an APNs key. It has to be uploaded once in the Fire…