Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-persist-sensitive-storage

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-persist-sensitive-storage

redux-persist storage engine for react-native-sensitive-info

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10K
decreased by-14.98%
Maintainers
2
Weekly downloads
 
Created
Source

redux-persist-sensitive-storage

npm version CircleCI License

Storage engine to use react-native-sensitive-info with redux-persist.

react-native-sensitive-info manages all data stored in Android Shared Preferences and iOS Keychain.

NOTE: Android Shared Preferences are not secure, but there is a branch of react-native-sensitive-info that uses the Android keystore instead of shared preferences. You can use that branch with redux-persist-sensitive-storage if you prefer.

Installation

You can install this package using either yarn or npm. You will also need to install and link react-native-sensitive-info.

Using Yarn:

yarn add redux-persist-sensitive-storage react-native-sensitive-info
react-native link react-native-sensitive-info

Using npm:

npm install --save redux-persist-sensitive-storage react-native-sensitive-info
react-native link react-native-sensitive-info

Usage

To use redux-persist-sensitive-storage, configure redux-persist according to its documentation.

Modify the persistStore call as follows:

import createSensitiveStorage from "redux-persist-sensitive-storage";

// ...

persistStore(store, { storage: createSensitiveStorage(options) });

options is optional and are used to configure the keychain service (iOS) and shared preferences name (Android) that react-native-sensitive-info uses. See the documentation for more information.

Here's a full example:

import { compose, applyMiddleware, createStore } from "redux";
import { persistStore, autoRehydrate } from "redux-persist";
import createSensitiveStorage from "redux-persist-sensitive-storage";

const store = createStore(
  reducer,
  compose(
    applyMiddleware(...),
    autoRehydrate()
  )
);

persistStore(store, {
  storage: createSensitiveStorage({
    keychainService: "myKeychain",
    sharedPreferencesName: "mySharedPrefs"
  });
);

Keywords

FAQs

Package last updated on 21 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc