0.2.0 • Published 2 years ago

turbo-secure-storage v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

screenshot


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, // the most secure option
  withBiometrics: true,
});

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

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

Unfortunately due how codegen works, you need 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.

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
  • Revisit Android code to make sure it handles all edge cases (RTL text)
  • Create testing device list
  • Security audit by expert

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

0.2.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago