auth0 / node-oauth2-jwt-bearer

Monorepo for libraries that protect Node APIs with OAuth2 Bearer JWTs
MIT License
91 stars 30 forks source link

Audience Checking shouldn't be forced #144

Open jag-eagle-technology opened 4 months ago

jag-eagle-technology commented 4 months ago

Checklist

Description

According to https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3 the audience claim is OPTIONAL. I'm trying to verify a token without an audience by not providing the audience parameter to this library, but this doesn't appear to be supported.

Reproduction

  1. Leave audience undefined
  2. Assertion in code checks for defined audience => error

Additional context

No response

express-oauth2-jwt-bearer version

1.6.0

Node.js version

18.18.2