I am not able to use Firebase Storage however I am using Identity Platform (firebase auth). Once a user is logged in to my web application, I would like them to be able to upload to a Cloud Storage bucket. The current way I am thinking about doing this is by have a Cloud Function which first uses firebase admin library to verify the token of the user and then generates a signed-url for the upload. Is this the correct method for doing this?
Asked
Active
Viewed 272 times
1 Answers
0
Google Cloud Identity Platform uses the same SDKs and most of the same back-end as Firebase Authentication. The main difference in is the set of features it supports, and its pricing model.
If your project is set up for using Cloud Identify Platform, you can still use the Firebase SDKs for Cloud Storage to upload, and use Firebase's server-side security rules to control read/write access for it. A common security model to get started with is content-owner only access.

Frank van Puffelen
- 565,676
- 79
- 828
- 807
-
The reason I'm not able to use Firebase Storage is actually that I'm not able to enable Firebase Storage because of some complications with my Orgs policies and an existing App Engine project which uses the default bucket. (https://stackoverflow.com/questions/69589227/specify-non-default-bucket-to-enable-firebase-storage). – Christopher Lang Oct 20 '21 at 19:55
-
I should add that, since I am not able to enable firebase storage, I get an error in the console when trying to interact with any bucket (by updating my firebase environment value for 'storageBucket' in my web app) and as I understand it, I won't be able to interact with any bucket that hasn't been created through the firebase console. – Christopher Lang Oct 20 '21 at 20:18
-
You should be able to add to an existing bucket using Firebase afaik. See https://stackoverflow.com/questions/46149059/how-to-use-firebase-storage-to-upload-to-existing-google-cloud-storage-bucket Did you get an error when you explicitly point your code to the GAE bucket, or another GCP-created bucket? – Frank van Puffelen Oct 20 '21 at 21:57
-
"message": "Your bucket has not been set up properly for Firebase Storage. Please visit 'https://console.firebase.google.com/project/my-project/storage/files' to automatically repair this issue and then retry. If the issue lasts longer than five minutes, you may have insufficient permissions to repair the project. You can check your permissions by visiting 'https://console.firebase.google.com/iam-admin/iam/project?project=my-project'." I have visited both of those urls and confirmed iam permissions for the firebase roles are correct. – Christopher Lang Oct 20 '21 at 22:38
-
When trying the method in the linked stackoverflow response, ```storageBucket: "
.appspot.com"``` I get a 404 from firebase since it doesn't have a .appspot.com domain created normally through the GCP console. – Christopher Lang Oct 20 '21 at 22:41