Error map
signing key Unable to find a signing key that matches the token kid (JWKS)
Authentication · layer 4, Application & API
Centre: this error. First ring: errors it is linked with (12). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.
Directly related (12)
invalid_token: The access token is invalid (JsonWebTokenError: invalid signature / jwt malformed)
A token was sent but the server couldn’t verify it — bad signature, malformed, revoked, or issued for another audience or environ…
Flask-JWT-Extended: {"msg":"Missing Authorization Header"}
A route decorated with `@jwt_required()` was called without an Authorization header.
UnauthorizedError: No authorization token was found (express-jwt)
express-jwt middleware ran on a route and found no token in the Authorization header.
Auth0: access token is opaque (not a JWT) because no audience was requested
The login returned a short opaque access token, not a JWT, because the request had no API `audience`.
Sign in with Apple: invalid_client
Apple rejected the client secret JWT or the Services ID configuration.
jwt.exceptions.DecodeError: Not enough segments
PyJWT received a string that does not have the three dot-separated segments of a JWT.
WeakKeyException: The signing key's size is 128 bits which is not secure enough for HS256
JJWT refuses to sign or verify with an HMAC key shorter than the algorithm requires (256 bits for HS256).
{"detail":"Given token not valid for any token type","code":"token_not_valid"}
Simple JWT could not accept the token — it is expired, signed with a different key or of the wrong type.
NextAuth: JWEDecryptionFailed: decryption operation failed
The session cookie cannot be decrypted because NEXTAUTH_SECRET changed or differs.
JsonWebTokenError: jwt malformed — token is not three dot-separated parts
The JWT library could not split the token into header.payload.signature, so the value you passed is not a JWT at all.
JsonWebTokenError: jwt audience invalid. expected: …
The token's `aud` claim does not contain the audience the verifier expects, so it was issued for a different API.
JsonWebTokenError: jwt issuer invalid — iss claim mismatch
The token's `iss` claim does not match the issuer URL the verifier trusts.
Two steps away (29)
Git: Permission denied (publickey). fatal: Could not read from remote repository.
SSH authentication to GitHub/GitLab/Bitbucket failed — no key, wrong key, or the key isn’t added to your account.
Azure AD (Entra ID): AADSTS700016 Application not found in the directory
The client ID in your sign-in request doesn’t exist in the tenant you’re authenticating against.
HTTP 401 Unauthorized
The request has no valid authentication credentials — you need to log in or send a valid token.
JWT Expired / Invalid Token
The JSON Web Token sent with the request is expired, malformed or signed with a different key, so the API rejects it (usually wit…
RuntimeError: Working outside of application context.
Code used current_app, g, or a Flask extension (like SQLAlchemy) without an active Flask application context.
JsonWebTokenError: jwt must be provided
jwt.verify() was called with an empty value — the token never reached the server code.
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
An Express/Node handler tried to send a second response (or set headers) after one was already sent.
Express: req.body is undefined / {} (body parser missing)
Express didn’t parse the request body because no body-parsing middleware matched the request’s Content-Type.
TypeError: Router.use() requires a middleware function but got a Object
app.use()/router.use() received an object instead of a function — usually a router module that wasn’t exported.
JWT error: invalid algorithm / The specified alg value is not allowed / jwt signature is required
The token’s alg header doesn’t match the algorithms the verifier allows — e.g. RS256 token verified as HS256, or an unsigned (alg…
NotBeforeError: jwt not active (nbf claim in the future)
The token’s nbf (not before) time is in the future for the verifying server — usually clock skew between servers.
Error: secretOrPrivateKey must have a value (jsonwebtoken sign)
jwt.sign() got an empty secret — the environment variable holding the JWT secret isn’t loaded.
OAuth Error: redirect_uri_mismatch
The redirect URI in your OAuth request doesn’t exactly match one registered for the client in the provider’s console.
OAuth 2.0 Error: invalid_client
The OAuth server couldn’t authenticate your application — wrong client ID/secret, wrong auth method, or the client doesn’t exist…
JWT error: algorithm "none" is not allowed / Algorithm not supported
The verifier rejected a token whose header says `alg: none` or lists an algorithm outside the allowed list.
httpx.RemoteProtocolError: Server disconnected without sending a response
The server closed the connection before sending any HTTP response, so httpx has nothing to parse.
httpx.ConnectTimeout / httpx.ReadTimeout: timed out
httpx waited longer than its timeout to connect to, or read from, the server.
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.example.com:443 ssl:default
aiohttp could not open a connection to the host, and the text after `ssl:` and the OS error show why.
java.net.SocketTimeoutException: Read timed out
The server accepted the connection but did not send a response within the read timeout.
ImmatureSignatureError: The token is not yet valid (iat / nbf)
The token's issued-at or not-before time is later than the verifier's clock, usually from clock drift between servers.
Authentication credentials were not provided (Django REST Framework 401/403)
DRF requires authentication on this view but the request carried no usable credentials.
{"detail":"No active account found with the given credentials"}
Simple JWT's login endpoint did not find an active user matching the username and password.
NextAuth / Auth.js: [next-auth][error][NO_SECRET] Please define a `secret` in production / MissingSecret
Auth.js needs a secret (NEXTAUTH_SECRET / AUTH_SECRET) in production to sign and encrypt tokens/cookies.
NextAuth: [next-auth][error][CLIENT_FETCH_ERROR] Unexpected token < in JSON
The client could not fetch `/api/auth/session` as JSON, often because NEXTAUTH_URL is wrong or the route returns HTML.
HTTP 498 Invalid Token
A non-standard code (used by Esri/ArcGIS and some APIs) meaning the access token is expired or invalid.
Okta: E0000011 Invalid token provided
The Okta API call used an expired, revoked or malformed token.
Facebook Graph API: OAuthException (#190) Error validating access token
The Facebook access token is expired, invalidated or for another app.
Google ID token verification failed: Wrong recipient, payload audience != requiredAudience
The Google ID token's `aud` is not your client ID, so server-side verification rejects it.
OIDC: unexpected iss claim value / issuer mismatch
The issuer in the ID token differs from the configured issuer.