jsonwebtoken breaking changes
jsonwebtoken 9.0.0 (December 21, 2022) is its newest release with breaking changes, 17 of them. The first: Drops support for Node.js versions 11 and below in jsonwebtoken 9.0.0. Every breaking API change we have recorded in jsonwebtoken on npm: 17 breaking changes in 1 version. Below, its one version with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 9.0.3, released December 4, 2025. Source repository
Packages on npm run on Node.js. Node.js end of life dates.
jsonwebtoken 9.0.0 breaking changes
- Removed
Code running on Node.js 11 or older will no longer work with this release. Upgrade to Node.js 12 or later. github.com - Behavior changed
secretOrPublicKey and secretOrPrivateKey must be valid key material compatible with Node's createSecretKey, createPrivateKey or createPublicKey. github.com - Behavior changed
sign and verify now fail when an asymmetric key is passed with HS algorithms. Use a secret key for HMAC tokens. github.com - Behavior changed
Keys whose type does not fit the algorithm now cause sign and verify to fail. Set allowInvalidAsymmetricKeyTypes to keep the old behaviour. github.com - Behavior changed
sign
Signing with RSA keys under 2048 bits now fails. Set the allowInsecureKeySizes option to true to keep the old behaviour. github.com - Behavior changed
verify
To accept unsigned tokens you must now explicitly pass 'none' in options.algorithms. github.com - Signature changed
Algorithm
Was type Algorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none"; now type Algorithm = | "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256"... npmjs.com - Signature changed
Secret
Was type Secret = | string | Buffer | {key: string | Buffer; passphrase: string}; now type Secret = | string | Buffer | KeyObject | {key: string | Buffer; passphrase: string}. npmjs.com - Signature changed
sign
Was function sign(payload: string | Buffer | object, secretOrPrivateKey: Secret, callback: SignCallback): void function sign(payload: string | Buffer | object, secretOrPrivateKey: Secret, options: SignOptions, callback: SignCallback): void... npmjs.com - Signature changed
SignCallback
Was type SignCallback = (error: Error | null, encoded: string | undefined) => void; now type SignCallback = (error: Error | null, encoded?: string | undefined) => void. npmjs.com - Signature changed
SigningKeyCallback
Was type SigningKeyCallback = (error: Error | null, signingKey?: Secret) => void; now type SigningKeyCallback = (error: Error | null, signingKey?: Secret | PublicKey) => void. npmjs.com - Signature changed
SignOptions.expiresIn
Was expiresIn?: string | number | undefined; now expiresIn?: StringValue | number. npmjs.com - Signature changed
SignOptions.notBefore
Was notBefore?: string | number | undefined; now notBefore?: StringValue | number | undefined. npmjs.com - Signature changed
verify
Was function verify(token: string, secretOrPublicKey: Secret | GetPublicKeyOrSecret, callback?: VerifyCallback<JwtPayload | string>): void function verify(token: string, secretOrPublicKey: Secret | GetPublicKeyOrSecret, options... npmjs.com - Signature changed
VerifyCallback
Was type VerifyCallback<T = Jwt | JwtPayload | string> = (error: VerifyErrors | null, decoded: T | undefined) => void; now type VerifyCallback<T = Jwt | JwtPayload | string> = (error: VerifyErrors | null, decoded?: T | undefined) => void. npmjs.com - Signature changed
VerifyOptions.audience
Was audience?: string | RegExp | Array<string | RegExp> | undefined; now audience?: string | RegExp | [string | RegExp, ...(string | RegExp)[]] | undefined. npmjs.com - Signature changed
VerifyOptions.issuer
Was issuer?: string | string[] | undefined; now issuer?: string | [string, ...(string[])] | undefined. npmjs.com
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.