npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

medhira-expo-persist-secure-store

v0.0.1

Published

A secure storage integration for redux-persist using Expo SecureStore. Powered by MEDHIRA - Engineering Intelligence Across Everything.

Readme


medhira-expo-persist-secure-store

A secure storage integration for redux-persist using Expo SecureStore.

This package provides a secure storage engine for redux-persist that uses Expo's SecureStore to encrypt and persist sensitive data securely on device.

Why MEDHIRA?

In mobile applications, sensitive data like authentication tokens, user credentials, and private information need to be stored securely. MEDHIRA Expo Persist Secure Store provides:

  • Encrypted Storage - Uses device's secure enclave
  • Seamless Redux Persist Integration - Drop-in storage engine
  • Cross-Platform - Works on iOS and Android via Expo
  • Simple API - Just replace your storage engine

Installation

npm install medhira-expo-persist-secure-store
# or
yarn add medhira-expo-persist-secure-store

Peer Dependencies

npx expo install expo-secure-store redux-persist
# or
npm install expo-secure-store redux-persist

Usage

As Global Storage Engine

Use as a redux-persist global storage engine:

import { createSecureStore } from 'medhira-expo-persist-secure-store';

import { createStore } from 'redux';
import { persistStore, persistCombineReducers } from 'redux-persist';
import reducers from './reducers';

// Secure storage
const storage = createSecureStore();

const config = {
  key: 'root',
  storage
};

const reducer = persistCombineReducers(config, reducers);

function configureStore() {
  const store = createStore(reducer);
  const persistor = persistStore(store);

  return { persistor, store };
}

Per-Reducer Storage

Use as an engine for only a specific reducer:

import { createSecureStore } from 'medhira-expo-persist-secure-store';

import { combineReducers } from 'redux';
import { persistReducer } from 'redux-persist';
import AsyncStorage from 'redux-persist/lib/storage';

import { mainReducer, secureReducer } from './reducers';

// Secure storage
const secureStorage = createSecureStore();

const securePersistConfig = {
  key: 'secure',
  storage: secureStorage
};

// Non-secure (AsyncStorage) storage
const mainPersistConfig = {
  key: 'main',
  storage: AsyncStorage
};

// Combine them together
const rootReducer = combineReducers({
  main: persistReducer(mainPersistConfig, mainReducer),
  secure: persistReducer(securePersistConfig, secureReducer)
});

function configureStore() {
  let store = createStore(rootReducer);
  let persistor = persistStore(store);

  return { persistor, store };
}

API

createSecureStore(options)

Creates a secure storage engine for redux-persist.

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | replaceCharacter | string | _ | Character to replace invalid key characters | | replacer | function | defaultReplacer | Custom function to transform keys |

Returns

An object with getItem, setItem, and removeItem methods compatible with redux-persist storage engines.

Default Replacer

The default replacer function replaces any character that is not alphanumeric, a dot, hyphen, or underscore:

function defaultReplacer(key, replaceCharacter) {
  return key.replace(/[^a-z0-9.\-_]/gi, replaceCharacter);
}

Custom Replacer

You can provide your own replacer function:

const storage = createSecureStore({
  replaceCharacter: '-',
  replacer: (key, replaceCharacter) => {
    // Custom key transformation
    return key.toLowerCase().replace(/\s+/g, replaceCharacter);
  }
});

Security Notes

  • Data is encrypted using the device's Secure Enclave
  • On iOS, uses Keychain
  • On Android, uses EncryptedSharedPreferences
  • Not all data needs to be secure - use for sensitive data only

License

MIT


Sponsor & Support

To keep this library maintained and up-to-date, please consider sponsoring it on GitHub.

Or, if you're looking for private support or help in customizing the experience, reach out to us at [email protected]

About MEDHIRA

MEDHIRA - Engineering Intelligence Across Everything


Made with passion by MEDHIRA