React Native Auth0 - v5.5.0
    Preparing search index...

    Class AuthError

    Represents a generic authentication or API error from Auth0.

    This class provides a structured way to handle errors, with consistent access to status codes, error codes, and response bodies.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    Properties

    Constructors

    • Constructs a new AuthError instance.

      Parameters

      • name: string

        The primary error identifier (e.g., the 'error' field from an OAuth2 response).

      • message: string

        A human-readable description of the error (e.g., the 'error_description' field).

      • Optionaldetails: { status?: number; code?: string; json?: unknown }

        An object containing additional error context.

      Returns AuthError

    Methods

    • A static factory method to create an AuthError from a fetch Response object. This is a utility that platform adapters can use for consistency.

      Parameters

      • response: Response

        The fetch Response object.

      • body: any

        The parsed body of the response (can be JSON or text).

      Returns AuthError

      A new AuthError instance.

    Properties

    status: number

    The HTTP status code of the error response, if available.

    code: string

    The error code returned by Auth0 (e.g., 'invalid_grant'), if available.

    json: unknown

    The full JSON response body of the error, if available.