Firestore Security Rules Error on Image: Missing or insufficient permissions.

Integrations

Hi,

I am trying to show information extracted from firebase and firestorage.

I have a collection called story and a subcollection fragment. A story has multiple fragments and each fragment contains a filed that stores an image url which points to firastorage.
In a page I managed to show a list of stories that belong to a user (field uid) but I also wanted to show the image of the first fragment. Here is where I get the permission error

I checked the permissions in firastorage and it seems ok to me, read access is granted to authenticated users, which I think that is the case as I can read the information from the stories without any permission issue.

below the storage rules, the images are stored in /free path. as an example:
https://firebasestorage.googleapis.com/v0/b/cuenta-me-7x9l58.appspot.com/o/free%2FDise%C3%B1o%20sin%20t%C3%ADtulo%20(16).png?alt=media&token=e721f3c1-abac-4187-bc37-9a458a3ec38e

If I copy and paste it on a new browser tab, the image is displayed without any issue. :?

rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /free/{allPaths=**} {
allow read: if request.auth != null;
// Only authenticated users can read
allow write: if false;
}
// Existing rule for the /users directory
match /users/{userId}/{allPaths=**} {
allow read,write : if request.auth != null && request.auth.uid == userId; // Allow read if the user is authenticated
}
// Rule to prevent any access to other unspecified paths by default
match /{allPaths=**} {
allow read, write: if false; // No access to other paths
}
}
}

Any idea how I could fix this issue?

Many thanks

What have you tried so far?

I reviewed the permissions in firestorage.

I created a new story using the app to be sure I am authenticated against firestorage.

Did you check FlutterFlow's Documentation for this topic?
No
4 replies