Open Asday opened 5 years ago
This is definitely going to be an issue. I will rework this to use AES to allow large blobs soon. Thank you for rising this issue
I was thinking of a much cruder solution:
setItem()
, store the size of value / 2048 as key
, then chunk value to 2048, and store as key[x]
;getItem()
, get the size of the value from key
, then retrieve that many chunks, and concatenate them;removeItem()
, get the size of the value from key
, then delete key[0-n]
.I don't think chunking is the right solution, it would create a lot of overhead and would be must less efficient
I'm not sure implementing one's own encryption would align with the name of the repo - encrypted by expo or by us, storing large amounts per key in securestore isn't possible.
I may be misunderstanding.
The usual solution for storing encrypted data on mobile is this (see other libraries implementing the same pattern):
I will create an extension to this package when I have time to allow for this pattern
@Cretezy so should we just wait and ignore the warning for now or ?
Depends on your case and environment. You should get an idea of how much stored breaks your intended audience's environments, and how much you're likely to store at most.
If it's looking risky for you, consider helping @Cretezy out with his describe AES solution, or switching to a different storage solution and sacrificing the security.
We eagerly await the new extension, @Cretezy!
We couldn't wait anymore for the new extension, so we created our own package which works as @Cretezy told it should (so big credits for him on the idea).
https://github.com/neverdull-agency/expo-unlimited-secure-store
@istvan-szilagyi This is great! I'm sorry for being a little bogged down recently.
If you'd like, create a PR with the information in the README.
any update on this?
Thank you @istvan-szilagyi ! I have switched to use your library.
Guys, you don't need to use this package at all. Just go to the project's main repository and copy the two files index.d.ts
and index.js
and then make a folder name redux-persist-exposecurestore in and then use it.
@Ayush6543 that is exactly using this package, you're just cutting out the NPM step (and taking the responsibility of transpilation).
Also that does absolutely nothing to fix the issue.
@Ayush6543 that is exactly using this package, you're just cutting out the NPM step (and taking the responsibility of transpilation).
What is transpilation?
Install: @react-native-async-storage/async-storage
Instead of expo-secure-store
Hope it will clear warning message! Will solve issue.
https://github.com/expo/expo/issues/1765
https://docs.expo.io/versions/latest/sdk/securestore/