Skip to main content
theauth-go exports sentinel errors and structured TheAuthError values. Use errors.Is for sentinel checks and errors.As to extract *TheAuthError for the Code field.

Sentinel errors (v1.0)

Sentinel errors (v2.0: OAuth 2.1 AS)

Sentinel errors (v2.3: identity linking)

Sentinel errors (v2.4: CIBA, RFC 9509)

TheAuthError and error codes

Newer service methods return *TheAuthError (accessible via errors.As):

Code constants

OAuth wire error codes

These are the standard OAuth 2.1 error strings returned in JSON error bodies by the AS endpoints:

Callers must not switch exhaustively on error codes

The catalog grows with minor releases. Always include a default case or a fallthrough to generic error handling.
Last modified on October 7, 2026