Overview
If MMKV storage initialization fails, some code paths fall back to AsyncStorage for persisting auth-adjacent data. AsyncStorage is unencrypted plaintext storage — using it for session-related data exposes tokens on rooted/jailbroken devices.
Specifications
Features:
- Remove
AsyncStorage as a fallback for any auth or session-related data
- If MMKV fails, show a storage error screen rather than downgrading to plaintext storage
Tasks:
- Audit all
AsyncStorage usages and categorize them (sensitive vs non-sensitive)
- Replace sensitive
AsyncStorage usages with secureStorage or remove the fallback
- Add a lint rule to warn on
AsyncStorage usage in auth-related files
Impacted Files:
src/store/createStore.ts
src/services/secureStorage.ts
- All files importing
AsyncStorage for auth-related data
Acceptance Criteria
- No
AsyncStorage used for tokens or session data
- MMKV failure shows a recovery screen, not a plaintext fallback
- Lint rule prevents future
AsyncStorage use in auth modules
Overview
If MMKV storage initialization fails, some code paths fall back to
AsyncStoragefor persisting auth-adjacent data.AsyncStorageis unencrypted plaintext storage — using it for session-related data exposes tokens on rooted/jailbroken devices.Specifications
Features:
AsyncStorageas a fallback for any auth or session-related dataTasks:
AsyncStorageusages and categorize them (sensitive vs non-sensitive)AsyncStorageusages withsecureStorageor remove the fallbackAsyncStorageusage in auth-related filesImpacted Files:
src/store/createStore.tssrc/services/secureStorage.tsAsyncStoragefor auth-related dataAcceptance Criteria
AsyncStorageused for tokens or session dataAsyncStorageuse in auth modules