Securely store sensitive data in react-native app

How to save keys securely in iOS and Android devices

May 7, 2017 - 1 minute read -
code react-native ios android

Introduction

For securely storing sensitive data in react-native application there is different approaches for different platforms.

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