@faable/auth-js - v2.1.0
    Preparing search index...

    Type Alias AuthResult<Data>

    The uniform result shape every asynchronous method on FaableAuthClient resolves to.

    The whole client follows one error contract: methods never throw for expected failures — they resolve with the error in error. On success error is null and data holds the payload; on failure data is null and error is an AuthError. Always check error before reading data. The only thing that throws is createClient itself (missing domain/clientId — a programming error, not a runtime one).

    If you prefer throw-style control flow, wrap a call in unwrap instead of hand-writing if (error) throw error.

    AuthResponse and OAuthResponse are the two richer, discriminated variants of this same contract.

    type AuthResult<Data = unknown> = {
        data: Data | null;
        error: AuthError | null;
    }

    Type Parameters

    • Data = unknown
    Index

    Properties

    Properties

    data: Data | null
    error: AuthError | null