0

I am using localStorage to store token values and other basic user details for an offline mechanism in an Ionic application. localStorage is not a secure way to store sensitive data. Is there any plugin or any other way to store such data so that it is protected? I am targeting all three platforms, Windows Phone, iOS, and Android.

ches
  • 6,382
  • 2
  • 35
  • 32
Anand
  • 191
  • 1
  • 12
  • Please read this : http://stackoverflow.com/questions/17280390/can-local-storage-ever-be-considered-secure – Sampath May 05 '16 at 12:41
  • @Anand If you still wanna secure the localstorage data at any cost, you can use RSA 1024 bit algorithm to encrypt the data using public key and store it in local storage. You can decrypt the same using private key in server side – Gandhi May 05 '16 at 13:30
  • Check out the [sqlcipher plugin](https://github.com/litehelpers/Cordova-sqlcipher-adapter) – Alex Chance May 05 '16 at 15:31
  • @Gandhi Encryption and Decryption am completely expected in client's end.There is no server component involved. asically what I am tring to do is, once I get the data from server, I will store in localStorage in encrypted format and when I retireve decrypt adn get back.Hence its completely with app's perspective.Any idea ? This is Ionic Application – Anand May 11 '16 at 03:23

1 Answers1

0

I came across a cordova plugin called secured storage plugin for this. I hope this should do the trick for you as it keeps the data secured.

Gandhi
  • 11,875
  • 4
  • 39
  • 63
  • Thanks for the info.We can implement that. But how to go for Windows ? As I see, it supports only iOS and Android. – Anand May 11 '16 at 09:02
  • @Anand You may have to handle it through your custom logic in case of windows as this plugin dont support windows platform. – Gandhi May 11 '16 at 09:56