jose covers the whole JOSE family — signed and encrypted tokens, JWK import and export, local and remote JWK sets — with one API in every JavaScript runtime. Since version 6 it does all cryptography through WebCrypto, so keys are CryptoKey objects (Node.js KeyObject instances are still accepted), and the library inherits WebCrypto's curve list: ES256, ES384 and ES512, EdDSA and Ed25519, and in 6.2.13 the ML-DSA algorithms where the runtime provides them. ES256K and Ed448 are refused with ERR_JOSE_NOT_SUPPORTED.
Its defaults are strict where it matters. jwtVerify() never accepts alg: none — unsigned tokens can only be read through the separate UnsecuredJWT class — and a key is bound to one algorithm family, so an HS256 token presented with an EC public key, or an RS256 token with an EC key, fails with a TypeError instead of verifying. ES256 also refuses a P-384 key. Pass algorithms anyway: with a key set that holds several key types, it is what stops an issuer from switching algorithms silently.
Two defaults cut both ways. clockTolerance is zero, which is strict, and exp is optional, which is not: a token without an expiry verifies unless you list it in requiredClaims, as the sample does. A JWS whose ECDSA signature arrived as DER — typical when a token is assembled by hand with a cloud KMS or openssl dgst — fails with the generic signature verification failed, with nothing pointing at the encoding; the JWT debugger shows the signature length at a glance, and the DER ⇄ raw converter fixes it.
Key import is explicit: importSPKI and importPKCS8 take PEM strings — DER bytes are refused with "spki" must be SPKI formatted string — importX509 takes a PEM certificate, and importJWK takes a JWK. The SEC1 EC PRIVATE KEY files that OpenSSL writes by default are rejected by importPKCS8; convert them to PKCS#8 first, for example with the JWK converter.
For verifying tokens from an identity provider, use createRemoteJWKSet with the provider's jwks_uri: it caches keys, refetches on an unknown kid and rate-limits refetches. Check what the provider actually publishes with the JWKS checker.