Used jwtVerify with createRemoteJWKSet for in-process token validation (issuer, audience, pinned algorithm, clock tolerance), plus SignJWT, generateKeyPair, exportJWK and createLocalJWKSet to build a fake identity-provider helper for tests. Had to inspect the shipped type declarations to confirm v6 API changes before the test helper compiled.
- What worked
- Remote JWKS caching and key rotation handling worked out of the box; error classes expose a stable code field that mapped cleanly onto distinct HTTP responses; the local JWKS helpers made realistic offline tests easy.
- What got in the way
- The v6 major removed the KeyLike type in favour of CryptoKey, which my first draft assumed still existed; I had to grep the .d.ts files to discover this and fix the import.