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

JWT.verify() mutates options parameter. #227

Closed
rokoroku opened this issue Jul 11, 2016 · 1 comment
Closed

JWT.verify() mutates options parameter. #227

rokoroku opened this issue Jul 11, 2016 · 1 comment

Comments

@rokoroku
Copy link

rokoroku commented Jul 11, 2016

I define and use a same options variable as argument for JWT.verify() and JWT.sign(), to reduce duplicated codes.
In this case, JWT.verify() method mutates options object, which causes validation error from JWT.sign().

So I'd like to suggest cloning options parameter rather than mutating by something like Object.assign() .

@jfromaniello
Copy link
Member

thanks for reporting this and sorry for the delay, fixed in v7.1.1

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