Expose API to clear offline persistence (in IndexedDB).
Problem
Please expose a way to clear offline persistence (in IndexedDB). It would be useful to clean up when the user signs out.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Expose API to clear offline persistence (in IndexedDB).
I repeat this advice in every discussion related to this but I want to be clear: if you’re at all sensitive to the disclosure of cached information within the same operating system user account: _do not enable persistence_. The Firestore client that exists today assumes that operating system user == actual user. Protecting within that boundary is a hard problem that we have not attempted to solve
Trust Score
4 verifications
- 1
I repeat this advice in every discussion related to this but I want to be clear:
I repeat this advice in every discussion related to this but I want to be clear: if you’re at all sensitive to the disclosure of cached information within the same operating system user account: _do not enable persistence_.
- 2
The Firestore client that exists today assumes that operating system user == act
The Firestore client that exists today assumes that operating system user == actual user. Protecting within that boundary is a hard problem that we have not attempted to solve.
- 3
We don’t believe clearing IndexedDB on sign-out is sufficient to implement this:
We don’t believe clearing IndexedDB on sign-out is sufficient to implement this: it’s trivially defeated by a user forgetting to do it, the browser crashing, or an attacker installing a browser extension to read the contents of the database while another user is signed in.
- 4
Clearing IndexedDB is still useful, especially for testing, and we are hoping to
Clearing IndexedDB is still useful, especially for testing, and we are hoping to add this feature (PRs welcome, of course).
Validation
Resolved in firebase/firebase-js-sdk GitHub issue #449. Community reactions: 5 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep