You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
verify throws undocumented TypeError for invalid input with algorithm: 'ES512', instead of a documented JsonWebTokenError #767
If I pass a ES512-signed token missing one character from the end to verifyToken, it should throw a JsonWebTokenError with message "invalid signature", not a TypeError.
I need to be able to return sane error codes from an API I'm making for verifying license tokens encoded as JWTs. I guess I can grep for this error message, but I feel less confident that I'll be able to return a better error code than "internal error" in all cases.
changed the title [-]verify throws undocumented TypeError for invalid input with algorithm: 'ES512'[/-][+]verify throws undocumented TypeError for invalid input with algorithm: 'ES512', instead of a documented JsonWebTokenError[/+]on Feb 17, 2021
Activity
[-]verify throws undocumented TypeError for invalid input with algorithm: 'ES512'[/-][+]verify throws undocumented TypeError for invalid input with algorithm: 'ES512', instead of a documented JsonWebTokenError[/+]fix: wrap crypto TypeError in JsonWebTokenError for EC/RSA signatures