finds.dev

emeraldsanto/react-native-encrypted-storage

React Native wrapper around EncryptedSharedPreferences and Keychain to provide a secure alternative to Async Storage.

View on GitHubHomepage ↗

★ 572TypeScriptMITupdated Aug 2023

// the take

A thin React Native bridge that swaps AsyncStorage's plaintext XML files for Android's EncryptedSharedPreferences and iOS's Keychain. Drop-in API replacement — same setItem/getItem/removeItem/clear shape — so migration is usually a one-line import change. The target audience is any RN app that stores tokens or sensitive user data and doesn't want that data readable on a rooted device.

The platform choices are correct: EncryptedSharedPreferences on Android uses AES-256-GCM with a key stored in the Android Keystore, and iOS Keychain is the right primitive for secrets — not AsyncStorage, not MMKV, not SQLite. The API surface is intentionally minimal, which means there's almost nothing to misuse. The README is honest about the iOS Keychain persistence gotcha (data survives uninstall) and gives you the Objective-C snippet to handle it rather than pretending it doesn't exist. TypeScript types are included and the native error codes are forwarded to JS, so you can actually distinguish 'item not found' from 'decryption failed'.

Abandoned since August 2023 — open issues include crashes on newer Android API levels and incompatibility with the New Architecture (Fabric/TurboModules). The iOS implementation is still Objective-C, not Swift, which matters if you're on a modern Xcode setup with strict module settings. No biometric authentication option — if you want to gate Keychain reads behind Face ID, you're on your own or need a different library. The iOS Keychain item size limit is mentioned in a StackOverflow link rather than tested and documented; anyone trying to store large blobs will hit a wall with no guidance on chunking.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
572
Forks
82
Language
TypeScript
License
MIT
Last commit
21 Aug 2023

// nearby

If react-native-encrypted-storage isn't quite it.

All repos →