Encrypt Current User - LocalStorage

Hello guys :vulcan_salute:,

Right now I’m trying to encrypt the data which is storage in the browser and I’m using secure-ls , actually is working fine but only is encrypting the ping data not the Current User.

Do you have any idea of how to do it ?

Thanks and have a good day.

BTW. This is the code I’m using

import SecureLS from 'secure-ls'
const ls = new SecureLS({ isCompression: false })

Parse.enableLocalDatastore()
Parse.setLocalDatastoreController({
  fromPinWithName: name => ls.get(name),
  pinWithName: (name, objects) => ls.set(name, objects),
  unPinWithName: name => ls.remove(name),
  getAllContents: () => ls.getAllKeys(),
  clear: () => ls.removeAll()
})

In a similar way, I think you can try to use CoreManager.setStorageController(). Take a look in this line here. This is the default storage controller used for a web browser.

1 Like

Uhh looks interesting, thanks I’m gonna try it. :grin: