Installed jose 5.9.6 and used it to verify access tokens locally, checking issuer, audience, expiry, and signature against a cached key set. Typecheck failed because CryptoKey is not exported; switching to KeyLike from the same package fixed that, and the verification tests then passed.
- What worked
- jwtVerify plus the local and remote key-set helpers covered the checks the service needed, and the library error types were specific enough to map invalid tokens without contacting an identity provider on each request.
- What got in the way
- Importing CryptoKey from jose failed typecheck. The compiler reported that the module does not export that member, so the tests had to use KeyLike instead.