Cotal TypeScript packages
    Preparing search index...

    Interface DeviceLoginOpts

    interface DeviceLoginOpts {
        clientId: string;
        idpUrl: string;
        migrationFrom?: string;
        onPrompt: (prompt: DeviceLoginPrompt) => void | Promise<void>;
        signal?: AbortSignal;
    }
    Index
    clientId: string

    The OAuth client id this CLI presents; the IdP may pin it via its validateClient hook.

    idpUrl: string

    The IdP auth base URL (Better Auth: <origin>/api/auth).

    migrationFrom?: string

    Retained auth URL when this approval is part of a native migration.

    onPrompt: (prompt: DeviceLoginPrompt) => void | Promise<void>

    Shows the human the verification URL + code. Called exactly once; polling starts only after it settles, a rejection fails the login, and the device code's lifetime bounds it.

    signal?: AbortSignal

    Stops this sign-in: no further IdP request is sent and nothing is persisted. It is local only and revokes nothing at the IdP. Omitted, the sign-in runs until approval, denial or expiry.