Adamant Solutions

OAuth2 and OIDC error doctor

Paste the error you got and see what it usually means, the causes in the order they most often turn out to be true, and what to check. A second tool compares the redirect URI you sent with the one you registered and names every difference. Everything runs in your browser.

Paste only the error, not secrets. You do not need to include tokens, client secrets or authorization codes. We only count anonymous visits (no cookies, no IP).

1. What does this error mean?

2. Compare redirect URIs

How to use this page

  1. Copy the error from the response body, the browser address bar (after a failed login) or the API log.
  2. Paste it in step 1. Any of these works: invalid_grant, a JSON body, a redirect URL containing error=, or a WWW-Authenticate header.
  3. Read the causes from the top: they are ordered by how often they are the real reason. Run the checks listed.
  4. If the error mentions the redirect URI, use step 2 with the exact strings from your app and from the server's client registration.

Examples

  • invalid_grant on the token request usually means the code was used twice, expired, or the redirect_uri or PKCE code_verifier differs from the authorization request. Example: the app registered https://app.example.com/callback and sent https://app.example.com/callback/ in the token request. Step 2 reports "Path differs only by a trailing slash".
  • invalid_client often means the secret is sent in a way the server does not accept (HTTP Basic vs form body) or belongs to another environment.
  • invalid_token from an API is an expired or wrong-audience token: decode it with the JWT inspector.

What this tool does not do

It explains the standard errors defined in RFC 6749, RFC 6750, RFC 7636, RFC 8628 and OpenID Connect Core. Providers add their own codes and messages; for those, read the provider documentation and the error_description. It cannot see your server configuration, so the causes are likely reasons, not a diagnosis.

Privacy and security of what you paste

The text you paste is processed in your browser. It is not sent to us or stored. Even so, avoid pasting live secrets: an authorization code, access token or client secret is a credential. Errors and redirect URIs do not need them. If you did paste one by mistake, revoke or rotate it. The page is not given advertising because you may paste URLs from your systems; see the privacy notice.

Related tools: OAuth2 flow tester · callback receiver · JWT inspector · HTTP request tester.

Login flows still failing, or designing OAuth2 for your API?

We configure and review OAuth2/OIDC with WSO2 Identity Server and API Manager. See the WSO2 services or the security review.

Message us on LinkedIn