Introduction
For securely storing sensitive data in react-native application there is different approaches for different platforms.
- For iOS application we will use Keychain Services
- For android application we will use Android KeyStore System
React Native library “react-native-secure-key-store”
This library internally store sensitive data securely to KeyChain and KeyStore service in iOS and Android respectively.
Installation
The plugin can be installed via the npm:
$ npm install react-native-secure-key-store --save
or via yarn
$ yarn add react-native-secure-key-store --save
Linking library to project automatically
$ react-native link react-native-secure-key-store
Usage
Above library will expose three methods set
, get
and remove
for storing data, retrieving data and removing data which is no longer needed respectively.
Complete usage of library in a typical react-native application
Source code
Source code available at react-native-secure-key-store