• Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language
    Java
  • License
    MIT License
  • Created over 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Secure Storage Turbo Module for React Native

Repo now archived

Sorry I don't have the time and energy to maintain it, feel free to fork it and publish your own version.

screenshot

yarn add turbo-secure-storage


A turbo-module to securely store data, uses Keychain on iOS and KeyStore/EncryptedSharedPreferences on Android. It also supports Biometric authentication

Gotcha's

  • This being a TurboModule is only compatible with RN 0.68+
  • Android's min SDK API is 23, to take advantange of the official keystore implementation

Examples

import TurboSecureStorage, { ACCESSIBILITY } from 'turbo-secure-storage';

const { error } = TurboSecureStorage.setItem('foo', 'bar', {
  accessibility: ACCESSIBILITY.WHEN_PASSCODE_SET_THIS_DEVICE_ONLY,
  // OR
  withBiometrics: true,
});

const { error, value } = TurboSecureStorage.getItem('foo', {
  withBiometrics: true,
});

const { error } = TurboSecureStorage.deleteItem('foo', {
  withBiometrics: true,
});

Unfortunately due how codegen works, you always need to pass the options object, even if it is empty

iOS Accessibility

On iOS you can specify an accesibility value which allows to customize when the data is readable. It is mutually exclusive biometrics. So pick one or the other.

TODO

  • Implement official Android keystore implementation
  • Add passcode / password fallback for Android if possible
  • Add getAllKeys, getAllItems and deleteAllItems methods (if possible)
  • Support Secure Enclave on Apple devices
  • Create testing device list
  • Security audits

About me

I'm available for React Native consulting and also create other products, get in touch. You can also see how this library was built from scratch on my YouTube channel.

License

MIT License

More Repositories

1

sol

MacOS launcher & command palette
TypeScript
1,921
star
2

link-preview-js

⛓ Extract web links information: title, description, images, videos, etc. [via OpenGraph], runs on mobiles and node.
TypeScript
650
star
3

react-native-quick-sqlite

Fast SQLite for react-native.
477
star
4

react-native-macos-menubar-template

A template project for a macOS menu bar/tray app with react-native-mac-os
Ruby
84
star
5

react-native-bump-version

Small script I use to bump my react-native releases (`yarn bump`)
Shell
42
star
6

react-native-jsi-template

Template for react-native jsi module
Java
34
star
7

osp-toolkit

TypeScript
10
star
8

jsi_benchmark

Java
10
star
9

bin

Personal utility scripts
Shell
8
star
10

messer

Messer WAS a native macOS menu bar app to quickly do simple image manipulations: resize, convert, pad, etc
Swift
6
star
11

generative_rust

Rust
5
star
12

jsi-cpr-test

Java
5
star
13

RNAppClip

Demo of app clip with the new arch enabled
Swift
3
star
14

raycast_google_translate

Translate on raycast via google translate
TypeScript
2
star
15

cidemon

👹 MacOS menu bar app to monitor your CI jobs/deployments
TypeScript
2
star
16

google_translate_supported_languages

A list of supported languages in Google Translate
1
star
17

cidemon_issues

Repo containing CI Demon issues and request
1
star
18

messer_site

HTML
1
star
19

site_sol

JavaScript
1
star
20

expo-sqlite-benchmark

TypeScript
1
star
21

awesome_turbo_module

Just a repo trying to get turbo modules + codegen (typescript) to work
Java
1
star
22

libcprtest

Testing how to compile/link libcpr into an iOS/RN project
CMake
1
star
23

osp-haskell

Algorithms/Competitive Programming in haskell
Haskell
1
star
24

ospfranco.github.io

My personal site, uses Jekyll
HTML
1
star
25

advanced-algorithms

UMSS Advanced Algorithms class, mostly competitive exercises
Java
1
star