Getting 403 Forbidden error when trying to load image from Firebase Storage

前端 未结 4 1506
旧巷少年郎
旧巷少年郎 2021-02-07 13:59

I\'m using firebase storage to store and load images for users on my android app. All users must be authenticated before using it. Occasionally, some user profile images are not

4条回答
  •  醉酒成梦
    2021-02-07 14:38

    If you are just testing Storage you might not have implemented Authentication. By default Storage expects uploading user to be authenticated. To by-pass that, in the Storage->Rules write this :

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

    Worked like a charm for me. Have fun using Firebase

提交回复
热议问题