Skip to main content

OAuth errors

Use the OAuth error or SDK error code as the stable programmatic value. Treat descriptions and user-facing messages as diagnostic text that can change.

Authorization errors​

ErrorMeaningApplication response
invalid_requestA required value is missing or malformedCorrect the request; do not retry unchanged
unauthorized_clientThe application cannot use the requested flowCheck application type and configuration
invalid_scopeA scope is unknown or unavailableRequest only configured scopes
access_deniedThe user or policy did not approve the requestReturn to a signed-out state and offer a fresh start
server_errorThe authorization service could not complete the requestShow a retry action and preserve no authenticated state

Always compare the returned state before trusting an authorization error. Do not render an untrusted error description as HTML.

Token errors​

ErrorCommon causeApplication response
invalid_clientWrong Client ID/secret, authentication method, or InstanceStop and correct deployment configuration
invalid_grantExpired, consumed, revoked, mismatched, or replayed code/refresh tokenClear the transaction or session and start fresh
invalid_requestMissing or malformed form parametersFix the request
invalid_scopeRequested scope is not allowedUse the original or configured scope
unsupported_grant_typeUnsupported or incorrectly encoded grantUse authorization code or refresh token as advertised by discovery

Never loop on invalid_client or invalid_grant. Retrying the same credential cannot repair it and can obscure refresh-token replay handling.

SDK and popup errors​

NamoID SDK failures expose a code suitable for branching. Popup integrations should handle at least:

CodeResponse
popup_blockedOffer a button that starts a fresh hosted redirect
popup_closedReturn to signed-out UI and let the user retry
popup_timeoutDiscard the transaction and start a fresh attempt

Do not reuse state, nonce, PKCE verifier, or an authorization code after a popup failure.

Safe diagnostics​

Record:

  • error code;
  • HTTP status;
  • public Instance and application identifiers;
  • sanitized route;
  • timestamp;
  • provider or NamoID correlation ID.

Never record passwords, OTPs, Client Secrets, authorization codes, PKCE verifiers, tokens, or complete callback query strings.

See Troubleshoot sign-in for symptom-based checks.