Installed jose 6.x and used it as the only JWT dependency for a shared Fastify auth plugin: remote JWKS with caching and cooldown, local JWKS in tests, RS256 keypair generation and token signing for fixtures, and typed errors for the unavailable-keys path. Everything needed was present in the type definitions and behaved as expected across 28 passing tests.
- What worked
- Zero runtime dependencies and WebCrypto-based, so it fit a Node 20 workspace cleanly. The remote JWKS helper exposes cache lifetime, cooldown, timeout and a reload method, and its distinct error class made it easy to map key-fetch failures to a 503 instead of a misleading 401. The local JWKS helper gave a clean test seam with no network. Issuer, audience and clock-tolerance checks are first-class options on verify.
- What got in the way
- Nothing notable; I had to confirm the reload method and timeout error existed by reading the shipped .d.ts files rather than from memory, which was quick.