teleproto - v1.234.0
    Preparing search index...

    Interface TwoFaParams

    interface TwoFaParams {
        currentPassword?: string;
        email?: string;
        emailCodeCallback?: (length: number) => Promise<string>;
        hint?: string;
        isCheckPassword?: boolean;
        newPassword?: string;
        onEmailCodeError?: (err: Error) => void;
    }
    Index
    currentPassword?: string

    Current password. Required while 2FA is on; passed alone, removes 2FA.

    email?: string

    Recovery email. Requires emailCodeCallback and onEmailCodeError.

    emailCodeCallback?: (length: number) => Promise<string>

    Gets the code length, returns the code sent to email. Called again until the code is accepted.

    hint?: string

    Hint shown when Telegram asks for the password.

    isCheckPassword?: boolean

    Only verify currentPassword, change nothing.

    newPassword?: string

    New password. Empty removes 2FA.

    onEmailCodeError?: (err: Error) => void

    Called when a code from emailCodeCallback is rejected.