Skip to content
ecdsa.com
jwks-rsa (Node.js)JWKS and key discovery

Error message

The JWKS endpoint did not contain any signing keys

Also printed as

  • The JWKS endpoint did not contain any keys

jwks-rsa (Node.js) — JwksError from getSigningKey()

What it means

The JWKS endpoint answered with keys, but after filtering none of them can verify signatures. jwks-rsa keeps only keys whose `use` is `"sig"` or absent, whose `kty` is RSA, EC or OKP, and that import successfully as public keys. Everything else — encryption keys, symmetric keys, malformed or private JWKs — is dropped. The sibling message "did not contain any keys" means the `keys` array itself was empty or missing.

Why it happens

How to fix it

  1. 1.

    Look at kty, use and alg of every key

    One line of jq shows why each key is filtered. A `has_private: true` row means the key set leaks a private key: remove it and rotate that key.

    bash
    curl -s "$JWKS_URI" | jq '.keys[] | {kid, kty, use, alg, crv, has_private: has("d")}'
  2. 2.

    Publish at least one signing key

    If you operate the endpoint, include each active signing key with `use: "sig"`, a unique `kid` and its `alg`. Encryption keys may live in the same set as long as they are marked `use: "enc"`.

    json
    {
      "keys": [
        { "kty": "RSA", "kid": "sig-2026-10", "use": "sig", "alg": "RS256", "n": "…", "e": "AQAB" },
        { "kty": "RSA", "kid": "enc-2026", "use": "enc", "alg": "RSA-OAEP-256", "n": "…", "e": "AQAB" }
      ]
    }

Related errors

Browse the full signature error database