TallerWebSolutions / apollo-cache-instorage

Apollo Cache implementation that facilitates locally storing resources
MIT License
96 stars 11 forks source link

Support data encryption #3

Closed abenhamdine closed 4 years ago

abenhamdine commented 5 years ago

Hi and thx for this module,

However I don't see any possibility to encrypt the data persisted, unlike redux-persist (with https://github.com/maxdeviant/redux-persist-transform-encrypt).

Is it something you would consider ?

For security reasons, it would be harmful to persist without encryption a login mutation for example.

lucasconstantino commented 5 years ago

I think this is out of the scope of this package. Anyway, you can provide apollo-cache-instorage with a custom storage object, so encryption should be really easy to implement on that end.

Keep in mind, though, that different than redux-persist-transform-encrypt, Apollo memory cache - which is still in play here - would still store the non-encrypted data.

wtrocki commented 5 years ago

We probably looking into something like https://github.com/aerogear/web-encrypted-storage that can wrap any existing storage and it will support apollo-cache-instorage interface. Let me know if that works for you.

ping @StephenCoady