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

Is there a risk when someone modifies the userId in the cookie? #158

Closed
YogeshUmeshVaity opened this issue Dec 1, 2021 · 2 comments
Closed
Labels

Comments

@YogeshUmeshVaity
Copy link

I'm using this package to identify the users by storing a userId in the cookies. So if someone tries to set random userIds as cookie data in their browser, will they be able to convince my server that they are a user while they actually are not?

Does this package have some sort of mechanism for dealing with this kind of risk?

@dougwilson
Copy link
Contributor

dougwilson commented Dec 1, 2021

As long as you didn't set signed to false, then the user cannot change the contents without knowing the secret/keys information. That is the protection mechanism thia module provides against tampering.

@YogeshUmeshVaity
Copy link
Author

@dougwilson Thank you!

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

No branches or pull requests

2 participants