
Keep Flutter User Files Private With Storage Rules
A private Firestore record does not make its file private. Give Storage its own owner check, store paths instead of download URLs and test where access should end.
Notes from building real products — SaaS architecture, AI workflows, the trade-offs nobody warns you about.
188 articles

A private Firestore record does not make its file private. Give Storage its own owner check, store paths instead of download URLs and test where access should end.

When one row's expanded or favorite state lands on another after a refresh, give each value one owner, key rows by record ID and run a reorder test.

A deep link that opens from a terminal can still fail for users. Check the hosted file, the signing fingerprint, the router and cold, warm and app-absent launches.

Store each Flutter location fix with its timestamp, accuracy, source and access level, record only between Start and Stop, and show an honest gap when the app pauses.

Pick Firestore search by what users type: normalized prefix queries for names, Enterprise text search or an external index for words anywhere, and a rules-checked read before opening a hit.

A cancelled subscription keeps access until it expires, and a refund does not end it by itself. Re-check RevenueCat entitlement when paid actions run and revoke from server webhooks.

Hiding the role field in your app does not stop a client from sending it. Use Firestore rules with affectedKeys() on update, hasOnly() on create and server-set roles, then test them in the emulator.

When a FlutterFlow submit saves the document but the photo upload fails, a retry can create a duplicate. Give the submission an ID first, make each step safe to repeat and send the notification from the server.

A push skipped during quiet hours but marked sent never reaches a retry. Record a deferral with a wake time, claim each row with a lease, and mark it accepted only when FCM returns an ID.

A PDF marked available offline that will not open usually means the app trusted a download it never checked. Write to a .part file, verify size and hash, then promote it.

Two users tap Reserve on the last slot and both get a booking. Claim capacity in one server-side Firestore transaction, make retries safe with a request ID, and expire unpaid holds.

A Flutter paywall shows an error when the user cancels, or unlocks premium while a purchase still waits for approval. Model five purchase outcomes and unlock only from an active RevenueCat entitlement.
Showing 12 of 187 articles