Reputation: 267
I would like to access either indexedDB or localStorage while the user is logged in to the website, and deny access to that info while the user is logged out. Is there any way to do so?
Upvotes: 0
Views: 160
Reputation:
If I imagine following use-case: restrict non-authorized user from accessing sensitive data, which was previously stored by authorized user on the same device, I may consider storing encrypted values that can be deciphered upon successful login with the key from the server. For sure, it will not guarantee data security, but it will definitely ruin app performance that is expected to get boosted by IndexedDB or localStorage.
Upvotes: 2