Library / SDK
oblador/react-native-keychain avatar
oblador/react-native-keychain

react-native-keychain: Keychain and Keystore access for React Native

:key: Keychain Access for React Native

3,480 stars542 forksKotlinMIT

At a glance

What is it?
A native bridge that stores credentials in the iOS Keychain and Android Keystore instead of JavaScript memory. It suits apps that need protected tokens and biometric gating, and it is the wrong tool for bulk or non-sensitive data.
Who is it for?
Adopt react-native-keychain when a React Native app must keep passwords, tokens or other sensitive values in the platform's own protected store rather than in JS memory or plain AsyncStorage, and when you can rebuild the native projects and, on iOS, add the FaceID usage string. Do not adopt it as a general data store: it is for small credential values, not bulk records, and the README points to the documentation site for API detail rather than listing it inline.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 154 days ago.
What is it written in?
Mainly Kotlin, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What react-native-keychain stores, and who needs it

React Native runs JavaScript outside the platform's protected storage. AsyncStorage and similar JavaScript-side stores keep values in the app sandbox but do not use the Keychain or the Keystore, so a token kept there is only as safe as the app container. react-native-keychain exists to close that gap: the README describes it as providing access to the Keychain on iOS and the Keystore on Android for storing credentials such as passwords, tokens, or other sensitive information. The audience is therefore narrow and concrete. If your app signs a user in and must remember a refresh token between launches, or holds a wallet seed or an API secret, this is the layer between your JavaScript and the OS facility designed for exactly that. The README's Used By list names Rainbow Wallet, MetaMask Mobile and BlueWallet, which is consistent with the credential-storage framing: these are apps where a lost secret is a real loss.

How the bridge reaches the Keychain and Keystore

The package is a native module, not a JavaScript implementation of encryption. The repository layout shows the split plainly: an ios/ directory with RNKeychainManager, an android/ directory, and an src/ directory holding the JavaScript and TypeScript surface that the app imports. The RNKeychain.podspec file is what CocoaPods uses to build the iOS side, and package.json lists android, ios/RNKeychainManager, lib, src and RNKeychain.podspec in its files array, so the published artifact ships the native sources alongside the compiled JavaScript. Calls from your code cross into platform code, which then talks to the Keychain on iOS or the Keystore on Android. That is the whole data flow: JavaScript asks, native code writes or reads, the OS enforces protection. It also explains the constraints. Because the storage is the platform facility, the shape of what you can keep is a credential, not a table. And because the module is native, adding it changes your build, which is why the installation steps end with a rebuild rather than a JavaScript reload. The package is written primarily in Kotlin on the Android side, which is what the repository's primary language field reports.

Installing react-native-keychain and storing a first token

The README gives four installation steps. Add the package with yarn, install the iOS pods from the ios/ directory, optionally add a FaceID usage description to Info.plist, and rebuild both native projects. The first command is the package install:

bash
yarn add react-native-keychain

After that, run pod install inside ios/ so CocoaPods picks up RNKeychain.podspec:

bash
cd ios && pod install

If you plan to gate access with FaceID, the README says to add an NSFaceIDUsageDescription entry in your Info.plist. That is a plist key, not a JavaScript option, and it lives in the iOS project. The final step in the README is to re-build your Android and iOS projects; a Metro reload is not enough, because the native module has to be compiled into the app. Once the build is in place, the package exposes a JavaScript API for setting and retrieving credentials, and the README directs you to the documentation site at oblador.github.io/react-native-keychain for the call signatures rather than reproducing them. Read the API there before writing storage code, since the README itself does not list the function names or option objects.

Where react-native-keychain is the wrong choice

The design assumes small, sensitive values. If you are caching a feed, an offline catalogue or a large JSON blob, the Keychain and Keystore are the wrong home for it: they are credential stores, and the README frames the library around passwords, tokens and other sensitive information, not general persistence. Reach for a normal database or file store for that, and keep this package for the secrets. There is a second boundary worth naming. The README's installation section is short and defers all API detail to the documentation website, so anyone evaluating the library from the repository alone will not find the function list, the option names or the error behaviour in the README. The Changelog section likewise points to the GitHub Releases page. That is a documentation layout choice, not a defect, but it means the README is a signpost rather than a reference, and a team that only reads the README will underestimate what it needs to check. Finally, the package is native code: it cannot be used in a JavaScript-only environment, and any workflow that cannot rebuild the iOS and Android projects cannot adopt it.

react-native-keychain against the alternatives people search for

The related searches around this project cluster on a few names: React-native-encrypted-storage, React-native-sensitive-info, and Expo secure-store. The meaningful difference is where the secret lives. react-native-keychain goes to the iOS Keychain and the Android Keystore, which are the platform's own protected facilities, and the README states that directly. React-native-encrypted-storage describes itself around encrypted storage rather than around the platform keychain, so the protection model is an encrypted store the library manages rather than the OS credential facility. React-native-sensitive-info is a comparable bridge to platform storage. Expo secure-store is the option that matters if your app is built with Expo: it is Expo's own module for secure storage, and choosing it keeps you inside the Expo module set instead of adding a bare React Native native dependency. The trade-off is not which one is stronger in the abstract; it is whether you want the platform Keychain and Keystore directly, whether you are already committed to Expo's module ecosystem, or whether an encrypted store with a different threat model fits your app. The README does not draw these comparisons, so treat the choice as an architectural decision you make, not one the project makes for you. There is also a comparison to AsyncStorage-style key-value stores such as MMKV, but that is a different question: those are fast general storage, not credential storage, and swapping one for the other changes what you are protecting, not just how fast it is.

Maintenance, licence and the cost of upgrading

The repository is not archived, and the last push was on 2026-04-29. The most recent release listed is v10.0.0, published on 2025-03-23, following v9.2.3 on 2025-02-13 and v9.2.2 on 2024-11-21. The jump from v9 to v10 is the kind of version boundary that usually carries breaking changes, so read the release notes on the GitHub Releases page before upgrading rather than assuming a drop-in replacement. The README names a maintainer group rather than a single author: Joel Arvidsson as author, with Dorian Mazur, Vojtech Novak and Pelle Stenild Coltau as maintainers and Oleksandr Kucherenko as a contributor. The licence is MIT, which the README states as MIT © Joel Arvidsson 2016-2020, and package.json carries "license": "MIT". MIT is permissive and places few obligations on how you redistribute the package, but this is not legal advice; check how your own distribution and any bundled notices handle third-party licences. On upgrade cost, the practical burden is the native rebuild: every version bump means recompiling both platforms, and on iOS it means running pod install again so the podspec is picked up.

Editorial conclusion

Adopt react-native-keychain when a React Native app must keep passwords, tokens or other sensitive values in the platform's own protected store rather than in JS memory or plain AsyncStorage, and when you can rebuild the native projects and, on iOS, add the FaceID usage string. Do not adopt it as a general data store: it is for small credential values, not bulk records, and the README points to the documentation site for API detail rather than listing it inline. Before shipping, verify that the values you intend to store fit the credential model, that your iOS Info.plist carries NSFaceIDUsageDescription if you gate access with FaceID, and that your release process rebuilds both the Android and iOS projects after the dependency is added.

Frequently asked questions

What is react-native-keychain?

It is a React Native library that provides access to the Keychain on iOS and the Keystore on Android, for storing credentials such as passwords, tokens or other sensitive information. The README describes it in exactly those terms.

How do I install react-native-keychain?

Run yarn add react-native-keychain, then run pod install in the ios/ directory, optionally add an NSFaceIDUsageDescription entry in Info.plist for FaceID, and rebuild your Android and iOS projects.

Does react-native-keychain support biometrics?

The README's installation steps include an optional NSFaceIDUsageDescription entry in Info.plist if you want to support FaceID, so biometric gating is part of the supported setup on iOS. The call-level options are documented on the project's documentation website, not in the README.

Can I use react-native-keychain with Expo?

The README does not mention Expo. Its installation steps assume a React Native project where you can run pod install and rebuild the Android and iOS projects, so the documentation gives no Expo-specific path.

What is the licence for react-native-keychain?

It is MIT. The README states MIT © Joel Arvidsson 2016-2020, and package.json carries "license": "MIT".

Official sources

  1. Issues
  2. License: MIT
  3. oblador/react-native-keychain on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/oblador-react-native-keychain.svg)](https://hysenlabs.com/projects/oblador-react-native-keychain)