[英]Can't Access Firebase Storage Default Bucket From iOS App
A few hours ago I was able to access my default storage bucket without any problems.几个小时前,我可以毫无问题地访问我的默认存储桶。 However, now I can't.然而,现在我不能。 I receive the following message:我收到以下消息:
Error Domain=FIRStorageErrorDomain Code=-13021 "User does not have permission to access gs://MY_BUCKET_NAME/data.json." UserInfo={object=data.json, ResponseBody={
"error": {
"code": 403,
"message": "Permission denied. Could not perform this operation"
}
Here's my bucket rules:这是我的桶规则:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if request.auth != null;
}
}
}
I don't know what to do.我不知道该怎么办。 Can someone help?有人可以帮忙吗?
Note: I'm on the Blaze plan.注意:我正在使用 Blaze 计划。 firebase-storage@system.gserviceaccount.com is added to my default Firebase Storage bucket. firebase-storage@system.gserviceaccount.com 已添加到我的默认 Firebase 存储桶中。
Your rules require that a user be signed into your app in order to read or write any file in the bucket.您的规则要求用户登录您的应用程序才能读取或写入存储桶中的任何文件。 I would expect that the only reason why you would get that message is if there was no user signed in, or somehow you are trying to access a bucket that is not in the same project as the signed in user.我希望您收到该消息的唯一原因是没有用户登录,或者您试图访问与登录用户不在同一项目中的存储桶。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.