
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
Minimal ES256 JWT signer and verifier that pulls public keys from your JWKS endpoint.
Minimal ES256 JWT signer/verifier that pulls public keys from your JWKS endpoint. No custom claims, no middlemen—just subjects, issuers, and keys.
Highlights
https://<iss>/.well-known/jwks.jsonnpm testnpm install quick-jwt
Requires Node 18+ (for native fetch and WebCrypto).
import { generateKeyset } from "zeyra";
import { JWT } from "quick-jwt";
const kid = "2025Q4";
const issuer = "api.example.com";
const subject = "user-123";
// Generate ES256 keys (P-256)
const { privateJwk, publicJwk } = await generateKeyset();
// Create & sign a token (exp is seconds from now or an epoch in ms)
const token = await JWT.sign(
privateJwk,
new JWT(kid, issuer, subject, 60) // 60 seconds from now
);
// In production, serve your JWKS at:
// https://api.example.com/.well-known/jwks.json
// For tests/local dev, mock fetch with your public key:
global.fetch = async () => ({
ok: true,
json: async () => ({ keys: [{ kid, ...publicJwk }] }),
});
const verifiedSub = await JWT.verify(token);
console.log(verifiedSub); // "user-123" when valid, otherwise false
new JWT(kid, iss, sub, exp)
kid: key identifier that must match the JWK served in your JWKSiss: issuer domain (no protocol)sub: stable subject identifierexp: either seconds from now (e.g. 60) or an absolute epoch in millisecondsJWT.sign(privateJwk, jwt) -> Promise<string>
kid should be set on the key.JWT.verify(token) -> Promise<string | false>
kid, verifies the signature and expiration, and returns the subject when valid.Serve the public key that matches your kid:
{
"keys": [
{
"kid": "2025Q4",
"kty": "EC",
"crv": "P-256",
"x": "…",
"y": "…",
"key_ops": ["verify"]
}
]
}
npm testnpm run benchBENCH_ITERS=500 npm run benchExample output:
quick-jwt benchmark (lower ms is better)
task iterations total (ms) avg (ms) ops/sec
sign 150 80.5 0.5368 1863
verify 150 78.3 0.5219 1916
Type definitions ship with the package (types/index.d.ts), so editors and TypeScript projects get completions, parameter help, and return types out of the box.
iss, sub, iat, and exp are intentionally excluded—keep authorization decisions at the resource layer.kid in new tokens and the published key set.FAQs
Minimal ES256 JWT signer and verifier that pulls public keys from your JWKS endpoint.
We found that quick-jwt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.