🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

expo-secure-store

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-secure-store

Provides a way to encrypt and securely store key-value pairs locally on the device.

14.2.3
latest
Version published
Weekly downloads
379K
1.41%
Maintainers
27
Weekly downloads
 
Created

What is expo-secure-store?

The expo-secure-store package provides a way to securely store key-value pairs in a device's secure storage. This is useful for storing sensitive information such as authentication tokens, user preferences, and other confidential data.

What are expo-secure-store's main functionalities?

Storing a value

This feature allows you to store a key-value pair securely. The `setItemAsync` method takes a key and a value as arguments and stores them in the secure storage.

import * as SecureStore from 'expo-secure-store';

async function save(key, value) {
  await SecureStore.setItemAsync(key, value);
}

Retrieving a value

This feature allows you to retrieve a value stored under a specific key. The `getItemAsync` method takes a key as an argument and returns the corresponding value.

import * as SecureStore from 'expo-secure-store';

async function getValueFor(key) {
  let result = await SecureStore.getItemAsync(key);
  if (result) {
    console.log("🔐 Here's your value 🔐 \n" + result);
  } else {
    console.log('No value stored under that key.');
  }
}

Deleting a value

This feature allows you to delete a key-value pair from the secure storage. The `deleteItemAsync` method takes a key as an argument and removes the corresponding key-value pair from the storage.

import * as SecureStore from 'expo-secure-store';

async function deleteValueFor(key) {
  await SecureStore.deleteItemAsync(key);
}

Other packages similar to expo-secure-store

FAQs

Package last updated on 30 Apr 2025

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