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

    Interface EnvConfigOptions

    Options for creating an EnvConfig instance.

    All fields are optional except baseUrl. If optional fields are omitted,
    the configuration will use sensible defaults or fall back to environment
    variables loaded via loadEnv.

    • loginPath and logoutPath must not contain ? or # and cannot be empty strings.
    • email must be a valid email format if provided.
    • password cannot be an empty string if provided.

    0.1.1

    interface EnvConfigOptions {
        baseUrl: string;
        loginPath?: string;
        logoutPath?: string;
        email?: string;
        password?: string;
    }
    Index

    Properties

    baseUrl: string

    Base URL of the target server (e.g., https://example.com).
    Must be a valid HTTP or HTTPS URL. Trailing slashes are automatically removed.

    This field is required. The URL is normalized by trimming whitespace and
    stripping any trailing slash. An invalid URL will cause the constructor to throw.

    "https://api.example.com"
    
    loginPath?: string

    Path to the login endpoint, relative to baseUrl.

    "login"
    

    Must not contain query or fragment characters (? or #).
    Leading slashes are automatically removed. Empty string is forbidden.

    logoutPath?: string

    Path to the logout endpoint, relative to baseUrl.

    "logout"
    

    Must not contain query or fragment characters (? or #).
    Leading slashes are automatically removed. Empty string is forbidden.

    email?: string

    User email address for authentication.

    If provided, it must be a valid email format (basic regex validation).
    An empty string is treated as omitted, resulting in an empty string stored.

    password?: string

    User password for authentication.

    If provided, it cannot be an empty string. No other validation is performed.
    An empty string is only allowed when the field is omitted entirely.