FG
🔌 APIs & SDKsGoogle

Expose API to clear offline persistence (in IndexedDB).

Freshover 6 years ago
Mar 14, 20260 views
Confidence Score79%
79%

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

Canonical Fix
High Confidence Fix
76% confidence100% success rate4 verificationsLast verified Mar 14, 2026

Solution: Expose API to clear offline persistence (in IndexedDB).

Low Risk

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

76

Trust Score

4 verifications

100% success
  1. 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. 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. 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. 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

Worked: 4
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

firebasegooglesdkenhancementapi:-firestore