Packages

jose

6.2.18 · 18 Nov 2026MIT244.2M / weekRepositorynpmAtom feed

Your version

2.0.0

major8 Sep 2020Where it was published

2.0.7 is the newest release of 2.x.

In short

14 breaking2 removed2 deprecated2 new2 fixed3 internal

  • Breaking

    The JWE.decrypt option algorithms was removed and replaced with contentEncryptionAlgorithms (handles enc allowlist) and keyManagementAlgorithms (handles alg allowlist)

  • Breaking

    The JWT.verify profile option was removed, use e.g. JWT.IdToken.verify instead.

  • Breaking

    Removed the maxAuthAge JWT.verify option, this option is now only present at the specific JWT profile APIs where the auth_time property applies.

  • Breaking

    Removed the nonce JWT.verify option, this option is now only present at the specific JWT profile APIs where the nonce property applies.

  • Breaking

    The acr, amr, nonce and azp claim value types will only be checked when verifying a specific JWT profile using its dedicated API.

  • Breaking

    Using the draft implementing APIs will emit a one-time warning per process using process.emitWarning

  • Breaking

    JWT.sign function options no longer accept a nonce property. To create a JWT with a nonce just pass the value to the payload.

  • Breaking

    Due to added ESM module support Node.js version with ESM implementation bugs are no longer supported, this only affects early v13.x versions. The resulting Node.js semver range is >=10.13.0 < 13 || >=13.7.0

Security

3 advisories affect 2.0.0; 2.0.7 fixes them

Release note

Breaking changes

  • Breaking

    The JWE.decrypt option algorithms was removed and replaced with contentEncryptionAlgorithms (handles enc allowlist) and keyManagementAlgorithms (handles alg allowlist)

  • Breaking

    The JWT.verify profile option was removed, use e.g. JWT.IdToken.verify instead.

  • Breaking

    Removed the maxAuthAge JWT.verify option, this option is now only present at the specific JWT profile APIs where the
    auth_time property applies.

  • Breaking

    Removed the nonce JWT.verify option, this option is now only present at the specific JWT profile APIs where the
    nonce property applies.

  • Breaking

    The acr, amr, nonce and azp claim value types will only be checked when verifying a specific JWT profile using its dedicated API.

  • Breaking

    Using the draft implementing APIs will emit a one-time warning per process using process.emitWarning

  • Breaking

    JWT.sign function options no longer accept a nonce property. To create a JWT with a nonce just pass the value to the payload.

  • Breaking

    Due to added ESM module support Node.js version with ESM implementation bugs are no longer supported, this only affects early v13.x versions. The resulting Node.js semver range is
    >=10.13.0 < 13 || >=13.7.0

  • Deprecated

    Deprecated method JWK.importKey was removed

  • Deprecated

    Deprecated method JWKS.KeyStore.fromJWKS was removed

  • Breaking

    The use of unregistered curve name P-256K for secp256k1 was removed

  • Breaking

    Jose.JWE.Encrypt constructor aad and unprotectedHeader arguments swapped places

  • Breaking

    Jose.JWE.encrypt.flattened header (unprotectedHeader) and aad arguments swapped places

  • Breaking

    Jose.JWE.encrypt.general header (unprotectedHeader) and aad arguments swapped places

  • Breaking

    JWS.verify returned payloads are now always buffers

  • Breaking

    JWS.verify options encoding and parse were removed

Features

  • Added support for ESM (ECMAScript modules)

  • Decrypt allowlists for both key management and content encryption

Bug Fixes

  • typescript: allow Buffer when verifying detached signature

  • typescript: properly type all decode/verify/decrypt fn options

Refactor

  • Removed

    Removed nonce option from JWT.sign

  • Removed

    Removed deprecated methods and utilities

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.