CSRF-X Auth Library - v1.0.3
    Preparing search index...

    Interface LoginOptions

    Configuration options for the AuthClient.

    All fields are optional. If omitted, the client reads from environment
    variables (.env file or Bun.env). Explicit constructor options take
    precedence over environment variables.

    0.1.1

    interface LoginOptions {
        baseUrl?: string;
        email?: string;
        password?: string;
        cacheDir?: string;
        maxRetries?: number;
        retryDelayMs?: number;
        timeoutMs?: number;
        sendReferer?: boolean;
        sendOrigin?: boolean;
    }
    Index

    Properties

    baseUrl?: string

    Override the base URL of the target server.

    Uses BASE_URL from environment variables.

    Must be a valid HTTP/HTTPS URL.

    email?: string

    Override the user email.

    Uses USER_EMAIL from environment variables.

    If provided, must be a valid email format.

    password?: string

    Override the user password.

    Uses USER_PASSWORD from environment variables.

    Cannot be an empty string if provided.

    cacheDir?: string

    Custom directory for session cache.

    ~/.cache/libts-csrfx-auth

    The directory will be created automatically if it does not exist.

    maxRetries?: number

    Maximum number of retry attempts for HTTP requests.

    3

    Total attempts = maxRetries + 1.

    retryDelayMs?: number

    Initial retry delay in milliseconds (doubles each retry).

    100

    With default: 100ms, 200ms, 400ms.
    
    timeoutMs?: number

    Request timeout in milliseconds.

    15000 (15 seconds)

    sendReferer?: boolean

    Whether to send the Referer header in requests.

    true

    Some servers require a Referer header for CSRF protection.

    sendOrigin?: boolean

    Whether to send the Origin header in requests.

    true

    Some servers require an Origin header for CORS or CSRF validation.