
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
rn-keychain-store
Advanced tools
A secure, simple, and efficient React Native module for storing sensitive data using iOS Keychain and Android Keystore. This module provides a unified API for securely storing and retrieving sensitive information across both platforms.
# Using npm
npm install rn-keychain-store
# Using yarn
yarn add rn-keychain-store
# Using pnpm
pnpm add rn-keychain-store
cd ios && pod install && cd ..
No additional steps required. The module will be automatically linked.
No additional steps required. The module will be automatically linked.
import KeychainStore, { setItem, getItem, removeItem, clear } from 'rn-keychain-store';
// Store sensitive data
const storeToken = () => {
try {
const success = setItem('auth_token', 'your-secure-token');
if (success) {
console.log('Token stored successfully');
}
} catch (error) {
console.error('Failed to store token:', error);
}
};
// Retrieve stored data
const getToken = () => {
try {
const token = getItem('auth_token');
if (token) {
console.log('Retrieved token:', token);
}
} catch (error) {
console.error('Failed to retrieve token:', error);
}
};
// Remove specific item
const removeToken = () => {
try {
const success = removeItem('auth_token');
if (success) {
console.log('Token removed successfully');
}
} catch (error) {
console.error('Failed to remove token:', error);
}
};
// Clear all stored data
const clearAll = () => {
try {
clear();
console.log('All data cleared successfully');
} catch (error) {
console.error('Failed to clear data:', error);
}
};
setItem(key: string, value: string): booleanStores a value securely in the keychain/keystore.
key: The key to store the value undervalue: The value to storeboolean - true if successful, false otherwisegetItem(key: string): string | nullRetrieves a value from the keychain/keystore.
key: The key to retrievestring | null - The stored value or null if not foundremoveItem(key: string): booleanRemoves a value from the keychain/keystore.
key: The key to removeboolean - true if successful, false otherwiseclear(): voidRemoves all values from the keychain/keystore.
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library
FAQs
Keychain and Keystore simple API Implementation
The npm package rn-keychain-store receives a total of 1 weekly downloads. As such, rn-keychain-store popularity was classified as not popular.
We found that rn-keychain-store demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.