Installed jose and used its remote JWKS set and JWT verification for a token verifier that pins the algorithm and checks issuer, optional audience, clock tolerance and expiry. Tests used locally generated keys to sign valid, expired, wrong-issuer, unsigned, HMAC-signed and unknown-key tokens, and all behaved as expected.
- What worked
- Built-in key caching and refetch on unknown key IDs handles key rotation with no extra code. Key generation and signing helpers made fully offline tests easy. Both ESM and CJS builds worked under Node 20 with tsx.