简体   繁体   中英

What is the proper way to store sensitive data in react native app?

the most secure way to save sensitive data such as token or payment information.

should I store them in the android AsyncStorage, in the redux-store or shared preferences?

When it comes to storing sensitive data in a React Native app, it's important to use a secure storage solution that encrypts the data at rest, so that it can't be easily accessed by unauthorized parties. Some options for secure storage in a React Native app include:

Keychain : The Keychain is an iOS-only solution that stores the data in an encrypted format on the device's secure enclave. It is a built-in iOS feature and the most secure way to store sensitive data.

Encryption libraries : You can use encryption libraries such as react-native-sensitive-info or react-native-keychain to encrypt the data yourself before storing it. These libraries provide an API for encrypting and decrypting data, which you can use to protect sensitive data in your app.

Secure storage libraries : There are also libraries specifically designed for secure storage in React Native apps such as react-native-secure-storage which will take care of encryption and storage together.

The libraries

Now multiples libraries allow you to store sensitive in React Native code:

Note: On the native side, these libraries can use:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM