-
Notifications
You must be signed in to change notification settings - Fork 126
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
custom verify with invalid JWT signature. #328
Comments
I have the same issue (and confirmed this is still occurring in 10.1.0). It seems like if Alternatively the code responding to the Otherwise as @ankem points out there seems to be no way to work around the 500 with any changes to user application code. If either approach seems reasonable I could put a small PR together along those lines. |
…t threw an exception This prevents a custom verify() function from being called with decoded=null, from which the function then has no way to avoid producing a 500 response to the request. Include "ms" in devDependencies since it's needed to run the pre-commit hook.
PR #352 submitted for this issue |
Fix for #328 - treat JWT.decode() null return the same as if it threw an exception
HI,
|
I am using a custom verify method. When I tamper the signature part of the token I am getting a 500 error instead of 401.
Final response to client is
Can you please let me know how to solve this issue.
The text was updated successfully, but these errors were encountered: