Use this file to discover Exa products, pricing, evaluations, comparisons, use cases, agent interfaces, and technical documentation before exploring further.
JavaScript JWT libraries create and verify JSON Web Tokens, the signed tokens that carry identity claims between services. A server checks each token's signature and claims, such as its issuer, audience, and expiry, before it trusts the payload. These libraries handle the login sessions, API authentication, and single sign-on in web apps and backend services.
Popularity
jose has the most monthly downloads in this comparison, at 878.5M.
function getVerifier (options, globalOptions) {
const useGlobalOptions = globalOptions ?? options === verifierConfig.options
// Use global verifier if using global options with static key if (useGlobalOptions && hasStaticPublicKey) return verifier
// Only cache verifier when using default options (except for key) if (useGlobalOptions && options.key && typeof options.key === 'string') {
let verifier = validatorCache.get(options.key)
if (!verifier) {
verifier = createVerifier(options)
validatorCache.set(options.key, verifier)
}
return verifier
}
return createVerifier(options)
}
Fastify JWT
Adds sign, verify, and decode to a Fastify server, built on fast-jwt.
Downloads / mo
5.3M
Stars
588
Last release
10.2.8
License
MIT
Strengths
Request and reply helpers.The plugin registers request.jwtVerify and reply.jwtSign for route handlers.
Limitations
Secret required at registration.Registering the plugin requires a secret option.
const express = require("express");
const { expressjwt } = require("express-jwt");
const secret = process.env.JWT_SECRET;
if (!secret) throw new Error("Set JWT_SECRET to the issuer shared key");
const app = express();
app.get("/me", expressjwt({ secret, algorithms: ["HS256"] }), (req, res) => res.json(req.auth));
app.listen(3000);
FAQ
The decode function in jsonwebtoken returns a token's payload without checking its signature. Server code that trusts the payload calls verify instead.
A JWKS, or JSON Web Key Set, is a JSON document that publishes the public keys a token issuer signs with. jose creates a remote resolver that fetches missing or stale key sets, and AWS JWT Verify loads the key set from its jwksUri setting.
jsonwebtoken signs JWTs and verifies their signatures and configured claims in Node.js. It offers synchronous and callback forms of verify.
JWE, or JSON Web Encryption, is the token format for encrypted payloads. jose provides EncryptJWT and jwtDecrypt with claims validation.
jose signs, verifies, and encrypts tokens across web-compatible runtimes. jsonwebtoken signs and verifies tokens in Node.js.
A token carries an expiry only when the code sets expiresIn or an exp claim.
For coding agents
Found your JWT library? Help your agent use it.
Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.