Skip to content
Advertisement

Is localstorage data encryption necessary?

I am making an add to cart system first time and instead of using php , I am using javascript i.e in client side.

will it be safe ??
or if it is not, then what should I do to secure the data in localstorge?

Advertisement

Answer

Yes, it might be, in your case. As users might be able to manipulate the cost or quantity of item from local storage.

And now if you use such tampered data in checkout sessions, you might face issues regarding collection of payments.

My recommendation would be storing only authentication cookies in local storage but no app data.

For that, as a very easy and fast solution, go for something like Firestore

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement