Firebase Storage Make only Selected Basket (Folder) Public

 One of the big issue I face with google cloud storage is when I go to build a site which has public as well as private sections.

Defult rule  as follows make the whole basket open to read which is not necessary.

 match /{allPaths=**} {
      allow read;
      allow write: if request.auth != null;

If you make a basket (generated)  base rule and try to access the file without token like below , it will gives permission issue .<project id>*400.png?alt=media&token=

  "error": {
    "code": 403,
    "message": "Permission denied. Could not perform this operation"

The issue have to resolve in google cloud storate admin by giving access to perticular basket.

Ref :

Go to following URL :<project-id>,

And grant Legacy viewer , Storgae viewer permission to all users.


Popular posts from this blog

Uplaod to Firebase Storage from Node Express REST

Firebase Cloud Functions TypeError: Cannot read property 'val' of undefined

Custom Email template for Laravel Password Reset