Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: stored keys are shared across users? #110

Open
venkatkonjeti opened this issue Oct 17, 2018 · 1 comment
Open

Question: stored keys are shared across users? #110

venkatkonjeti opened this issue Oct 17, 2018 · 1 comment

Comments

@venkatkonjeti
Copy link

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?

@akhoury
Copy link
Collaborator

akhoury commented Oct 19, 2018

you need to use unique keys per user if you want to do that.

setItemSync("userResourceToken-" + userId, "someToken...")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants