Closed towkir closed 4 years ago
I've put together a demo showcasing this use case and it works!
https://codesandbox.io/s/persisted-state-encrypted-ibd0p
I only changed a couple of things:
ls
(or ss
) to the storage
option. Because it was redundant.{ paths: ['user'], }
One question: instead of passing the plugin twice, why not use it once and pass the 2 modules in there? Like:
{ paths: ['user', 'shared'], }
@gangsthub thanks for answering!
Can I encrypt both
sessionstorage
andlocalstorage
in aVuex
instance by creating multiple persistedstate ?I was trying to hydrate two separate modules, one in
localStorage
and another insessionStorage
, here is what I did, sincesecure-ls
(which you used in your documentation) only works withlocalStorage
, I tried to usesecure-web-storage
, here is the linkAnd here is the code how I gave it a try:
But looks like now the persistedstate does not work at all. Any idea how to achieve that ?
Many thanks