Overview
secureStorage.ts catches errors from its initialisation routine but sets a success flag and allows the app to continue regardless of whether setup actually succeeded. An app running with a broken secure store will silently store tokens in plaintext.
Specifications
Features:
- Make secure storage initialisation failures fatal — halt app startup with a clear error screen
- Provide an explicit recovery path (e.g., "Clear app data and restart") for unrecoverable failures
Tasks:
- Throw a fatal error from
secureStorage.initialize() if setup fails
- Add a
StorageErrorScreen component that shows recovery instructions
- Write a test that mocks the native module failure and confirms app halts
Impacted Files:
src/services/secureStorage.ts
src/screens/StorageErrorScreen.tsx (new)
Acceptance Criteria
- Secure storage failure prevents app from starting in an insecure state
- User sees a clear recovery instruction screen
- Test confirms app halts on storage failure
Overview
secureStorage.tscatches errors from its initialisation routine but sets a success flag and allows the app to continue regardless of whether setup actually succeeded. An app running with a broken secure store will silently store tokens in plaintext.Specifications
Features:
Tasks:
secureStorage.initialize()if setup failsStorageErrorScreencomponent that shows recovery instructionsImpacted Files:
src/services/secureStorage.tssrc/screens/StorageErrorScreen.tsx(new)Acceptance Criteria