我正在構建一個React Native應用程序,我需要保存一些敏感數據,如令牌和刷新令牌。明顯的解決方案是使用AsyncStorage保存該信息。問題是AsyncStorage的安全級別。將敏感數據保存在React Native中
AsyncStorage提供了一種本地存儲令牌和數據的方法。它可以在某些方面與LocalStorage選項相比較,可以是 。在完整的 生產應用程序中,建議不要直接訪問AsyncStorage ,而是使用抽象層,因爲AsyncStorage的 與使用相同瀏覽器的其他應用程序共享,因此不會從所有項目中刪除所有項目存儲可能會損害相鄰應用程序的功能。
https://auth0.com/blog/adding-authentication-to-react-native-using-jwt/
在本機應用程序,我會在Android
去Keychain
在iOS
和Shared Preferences
在私人模式。
對於我提供的文件中讀取陣營原住民:
在iOS上,AsyncStorage被存儲小值序列化字典 和更大的價值在不同的文件本機代碼的支持。在Android的 上,AsyncStorage將使用基於 可用的RocksDB或SQLite。
https://facebook.github.io/react-native/docs/asyncstorage.html
他們從來不談這些數據的安全性。
這是最好的解決方案創造Android
(在私人模式使用Shared Preferences
),另一個是iOS
(使用鑰匙扣)保存敏感數據的模塊?或者使用提供的AsyncStorage
方法是安全的?
你在找什麼,在這篇文章中回答:http://stackoverflow.com/questions/37563224/why-the-react-native-docs-recommends-that-you-use-an-abstraction-on -top-of-async –
該答案沒有對「AsyncStorage」的安全性做任何假設。 –
你可以看看這篇文章:https://stackoverflow.com/questions/45547657/what-is-the-best-way-to-store-private-data-in-react-native –