@auth0/auth0-acul-js - v1.10.0
    Preparing search index...

    Interface PhoneIdentifierChallengeMembers

    interface PhoneIdentifierChallengeMembers {
        branding: Screens.BrandingMembers;
        client: Screens.ClientMembers;
        countryCodes?: Screens.CountryCodesMembers;
        experiment?: Screens.ExperimentMembers | null;
        organization: Screens.OrganizationMembers;
        prompt: Screens.PromptMembers;
        screen: Screens.ScreenMembersOnPhoneIdentifierChallenge;
        tenant: Screens.TenantMembers;
        transaction: Screens.TransactionMembers;
        untrustedData: Screens.UntrustedDataMembers;
        user: Screens.UserMembers;
        changeLanguage(options: Screens.LanguageChangeOptions): Promise<void>;
        getErrors(): Screens.Error[];
        resendCode(payload?: Screens.CustomOptions): Promise<void>;
        resendManager(options?: Screens.StartResendOptions): Screens.ResendControl;
        returnToPrevious(payload?: Screens.CustomOptions): Promise<void>;
        submitPhoneChallenge(payload: Screens.PhoneChallengeOptions): Promise<void>;
        switchToPassword(payload?: Screens.CustomOptions): Promise<void>;
        switchToText(payload?: Screens.CustomOptions): Promise<void>;
        switchToVoice(payload?: Screens.CustomOptions): Promise<void>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    Optional on the interface so existing implementors of BaseMembers (e.g. test mocks) keep compiling. Always populated at runtime by the BaseContext constructor.

    experiment?: Screens.ExperimentMembers | null

    The active Experiment Center experiment for the current screen, or null when none is active (or the screen has not opted in via context_configuration).

    Optional on the interface so existing implementors of BaseMembers (e.g. test mocks) keep compiling. Always populated at runtime by the BaseContext constructor.

    Methods

    • Requests a new verification code for the user's phone number.

      Parameters

      Returns Promise<void>

      A promise that resolves once the form is submitted, before the new page loads. It doesn't confirm that a new code was sent.

      Submits a form POST with action: "resend-code". Auth0 responds by rendering this screen again, or the interstitial-captcha screen if a captcha is required. Either way the browser loads a new page, and the current JavaScript context, including component state and timers, is lost.

      Code after await resendCode() may still run, but anything it sets up, such as a "code sent" message or a countdown, is gone after the reload. Server-side errors, such as rate limits, appear in transaction.errors (or useErrors() in React) on the reloaded page. They don't reject the returned promise.

      To add a cooldown between resends, use resendManager() (or useResend() in React). It stores its countdown in localStorage, so the countdown survives the reload. It also disables resending when screen.data.resendLimitReached is true.