node-persist
node-persist copied to clipboard
Question: stored keys are shared across users?
I am using node-persist module in my application to store the tokens.
setItemSync("userResourceToken", "someToken...")
As per understanding this token will be shared across multiple sessions. Is that right?
If above question is true, then to separate the token for every user should I store the user specific token with unique key? In this case server storage is an option or should I choose the any db for this purpose?
you need to use unique keys per user if you want to do that.
setItemSync("userResourceToken-" + userId, "someToken...")