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
Given auth0/node-jws#23 , when passing an invalid JWT like: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.yJ1c2VybmFtZSI6InNhZ3VpYXIiLCJpYXQiOjE0NzEwMTg2MzUsImV4cCI6MTQ3MzYxMDYzNX0.foo
Throws an exception, which can't be handled as described on the doc by using err.name === 'UnauthorizedError' as given on the docs. I understand the (imo) bug is actually on jws, but maybe it's possible to try/catch decode and handle it as a token that failed verification.
The text was updated successfully, but these errors were encountered:
Given auth0/node-jws#23 , when passing an invalid JWT like:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.yJ1c2VybmFtZSI6InNhZ3VpYXIiLCJpYXQiOjE0NzEwMTg2MzUsImV4cCI6MTQ3MzYxMDYzNX0.foo
This line:
https://github.com/auth0/express-jwt/blob/master/lib/index.js#L86
Throws an exception, which can't be handled as described on the doc by using
err.name === 'UnauthorizedError'
as given on the docs. I understand the (imo) bug is actually onjws
, but maybe it's possible to try/catch decode and handle it as a token that failed verification.The text was updated successfully, but these errors were encountered: