finds.dev← search

// the find

emeraldsanto/react-native-encrypted-storage

★ 572 · TypeScript · MIT · updated Aug 2023

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

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.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →