Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react native store sensitive data in redux

import { createKeychainStorage } from 'redux-persist-keychain-storage'; 
const keychainStorage = createKeychainStorage(); 
const persistConfig = { 
// Keychain expects a reverse domain name qualifier (app bundle ID) style key  keyPrefix: 'com.myapp.persist.',  storage: keychainStorage,}; 
  const mainReducer = combineReducers({
  token: persistReducer({ ...persistConfig,key: 'token' }),
  }
 );
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged: #react #native #store #sensitive #data #redux
ADD COMMENT
Topic
Name
8+8 =