Configured the strategy to extract a bearer token from the Authorization header, accept only RS256, and enforce issuer and audience, with the signing key supplied by a JWKS provider callback. Tests for missing, malformed, wrong-audience, wrong-issuer, expired, and valid tokens all behaved correctly.
- What worked
- Issuer, audience, and algorithm restrictions are plain options. The secret-or-key-provider hook slotted in cleanly with the JWKS library, and failures surfaced as 401 rather than exceptions.