We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
According to the docs, mobx-persist can only store data in AsyncStorage, localStorage, and LocalForge.
However, is there any way to make mobx-persist work with a different storage container, such as react-native-keychain, to allow for encrypted storage?
I'm looking for a secure method for persisting passwords, tokens, cookies, etc. on iOS and Android, while still using Mobx.
The text was updated successfully, but these errors were encountered:
Yes. You can create new class secureStorage, implement functions (getItem, setItem, removeItem) and pass it instead of async storage
I'm using react-native-sensitive-info, you can use whatever you want
import SInfo from 'react-native-sensitive-info'; export const setItem = (key: string, value: string) => { return new Promise(async (resolve, reject) => { try { await SInfo.setItem(key, value, options); resolve(null); } catch (e) { reject(e); } }); }; export const getItem = (key: string) => { return new Promise(async (resolve, reject) => { try { const result = await SInfo.getItem(key, options); resolve(result); } catch (e) { reject(e); } }); }; export function removeItem(key: string) { return new Promise(async (resolve, reject) => { try { await SInfo.deleteItem(key, options); resolve(null); } catch (err) { reject(err); } }); } import * as SecureStorage from 'your-secure-storage'; const hydrate = create({ storage: SecureStorage, jsonify: true, });
Sorry, something went wrong.
No branches or pull requests
According to the docs, mobx-persist can only store data in AsyncStorage, localStorage, and LocalForge.
However, is there any way to make mobx-persist work with a different storage container, such as react-native-keychain, to allow for encrypted storage?
I'm looking for a secure method for persisting passwords, tokens, cookies, etc. on iOS and Android, while still using Mobx.
The text was updated successfully, but these errors were encountered: