I want to display an image saved in google storage with a URL or PATH saved in my database.
I create a file in my storage bucket with a cloud function
bucket.upload(thumbPath, {
destination: join(bucketDir, thumbName),
});
then i create a singnedUrl
const config = {
action: 'read',
expires: '03-01-2500',
};
const result = await thumbFile.getSignedUrl(config);
and save it in my database
I want to be able to always load the image with the saved URL. This works for about a week. But then I get 403 errors.
My storage Rules are:
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read: if true;
allow write: if request.auth != null;
}
}
}
Is there another way without using signed URLs because I think this is the source of the error