获取'用户无权访问此对象。代码:-13021 HttpResult:403' 错误。请看详情

Ham*_*sir 2 android firebase firebase-security firebase-realtime-database

我正在尝试从 FirebaseStorage 下载一些图像。

虽然我通过谷歌验证用户,但我仍然收到此错误:

E/StorageException: StorageException has occurred. User does not have permission to access this object. Code: -13021 HttpResult: 403 
Run Code Online (Sandbox Code Playgroud)

尝试下载图像时。

以下是规则:

service firebase.storage {
  match /b/appname-e3a12.appspot.com/o {
    match /{allPaths=**} {
      allow read, write;
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

有人对此有答案吗?

Moh*_*sif 5

尝试

service firebase.storage {
    match /b/appname-e3a12.appspot.com/o {
        match /{allPaths=**} {
            allow read, write: if true;
        }
    }
}
Run Code Online (Sandbox Code Playgroud)