Type alias AnonymousSessionErrorCode

AnonymousSessionErrorCode: "session_expired" | "invalid_session_token" | "unauthorized_client" | "feature_not_enabled" | "invalid_client" | "invalid_target" | "invalid_request" | "invalid_scope" | "server_error" | string

Error codes that can be set on an AnonymousSessionError.

Codes that map directly to Auth0 API error responses:

  • session_expired — The session token has expired.
  • invalid_session_token — The session token is malformed.
  • unauthorized_client — The client ID is not enabled for anonymous sessions.
  • feature_not_enabled — The tenant-level anonymous sessions flag is off.
  • invalid_client — Client authentication failed.
  • invalid_target — The resource server is not enabled for anonymous access.
  • invalid_request — The request was malformed or the resource server is not enabled. Also returned when the metadata payload exceeds the size limit (~1 KB, JSON-serialized).
  • invalid_scope — The requested scope is not granted to anonymous callers.
  • server_error — An Auth0 infrastructure error occurred.