User does not have permission to access this object . Firebase storage android

后端 未结 10 1695
甜味超标
甜味超标 2020-12-02 20:12

I am new to firebase storage. Just so I could learn it, I made a simple app that has a button and an ImageView. When I click on the button, an image (from

相关标签:
10条回答
  • 2020-12-02 20:53

    Firebase Storage Error (solved) 1. Go to firebase console under the project you are working on 2. Under storage on the firebase console and under rules edit the service firebase.storage to.

    service firebase.storage {
      match /b/{bucket}/o {
        match /{allPaths=**} {
          allow read, write;
        }
      }
    }
    
    0 讨论(0)
  • 2020-12-02 20:53

    I am adding this answer hoping it will help someone, in Firebase:

    1. go to "Storage"

    2. Select "Rules" tab and edit rules as per below:

      service firebase.storage {
         match /b/{bucket}/o {
           match /{allPaths=**} {
             // Allow access by all users
             allow read, write: if request.auth != null;
           }
         }
       }
      

    Note: make sure you have it exactly as above, do not replace {bucket} for your project name.

    0 讨论(0)
  • 2020-12-02 20:58

    Update your security rules with match /{allPaths=**} to indicate that public read and write access is allowed on all paths:

    service firebase.storage {
      match /b/savephoto-a1cc3.appspot.com/o {
        match /{allPaths=**} {
          // Allow access by all users
          allow read, write;
        }
      }
    }
    

    Various default rules are provides in the tabs of the Sample Rules section of the documentation.

    0 讨论(0)
  • 2020-12-02 21:01

    Follow these steps

    1. Go to "Storage"

    2. Select "Rules" tab and edit rules as per below:

    //if your application have authentication feature(login) then use this:-

    rules_version = '2';
    service firebase.storage {
      match /b/{bucket}/o {
        match /{allPaths=**} {
          allow read, write: if request.auth != null;
        }
      }
    }
    

    //if your application does not have login feature(directly any user can access storage) then use this:-

    rules_version = '2';
    service firebase.storage {
      match /b/{bucket}/o {
        match /{allPaths=**} {
          allow read, write;
        }
      }
    }
    
    0 讨论(0)
提交回复
热议问题