I have set the user read only permission for my bucket. It is working on mac and android for my vue app. However, it doesn't work on IOS. I got an 401 error saying the current user is not authorized to perform the requested action. Not really sure how to solve this issue.
This is a website?
Are you using cloud or self-hosted?
I am using appwrite cloud.
Are you sure permissions are set correctly?
I believe so. Because I have set user read only permission for the bucket. On Mac and android when visit my app after they are authenticated using createEmailSession(), users are able to download the file from the bucket. However, when users access my app from IOS device, it shows users are not authorized to download. It looks like the sdk does not grab the session data from the client, because when I add bucket policy with guest access, users are able to download the file then
I assume you are also creating a session with createEmailSession() in iOS?
And is this a website? Or an app?
It is an web application using Nuxt 3 as the frontend. And yes, I am using createEmailSession() in IOS.
So this is the same codebase between iOS and Android/Desktop?
Yes, it is same. That's why I found it really real wired.
probably a 3rd party cookie problem. do you have a custom domain configured?
I don't think so. My web app is deployed on render.com. And I did not add any custom domain name.
Then you will need to be sure third party cookies are allowed in your browser
for more info, see https://appwrite.io/docs/advanced/platform/custom-domains
Thank you @Steven @D5. I think that might be the cause. I will give it try.
Recommended threads
- Why does this happen?
`AppwriteException: general_argument_invalid, Invalid `secret` param: Value must be a valid string and at least 1 chars and no longer than 256 chars (400)` the...
- How to properly implement custom domain?...
- Site deployment does not work.
I can change a file, deploy, change does not take effect. Delete file in repo, push changes,deploy. Old file remains undeleted Duplicate file, rename it, push,...