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

    Interface LoginPasswordlessSmsOtpMembers

    interface LoginPasswordlessSmsOtpMembers {
        branding: BrandingMembers;
        client: ClientMembers;
        countryCodes?: CountryCodesMembers;
        experiment?: ExperimentMembers | null;
        organization: OrganizationMembers;
        prompt: PromptMembers;
        tenant: TenantMembers;
        user: UserMembers;
        untrustedData: UntrustedDataMembers;
        getErrors(): Error[];
        changeLanguage(options: LanguageChangeOptions): Promise<void>;
        screen: ScreenMembersOnLoginPasswordlessSmsOtp;
        transaction: TransactionMembersOnLoginPasswordlessSmsOtp;
        submitOTP(payload: SubmitOTPOptions): Promise<void>;
        resendOTP(payload?: CustomOptions): Promise<void>;
        resendManager(options?: StartResendOptions): ResendControl;
        switchConnection(payload: SwitchConnectionOptionsSmsOtp): Promise<void>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    branding: BrandingMembers
    countryCodes?: CountryCodesMembers

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

    experiment?: 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.

    organization: OrganizationMembers
    untrustedData: UntrustedDataMembers

    Methods

    • Returns Error[]

    • Parameters

      Returns Promise<void>

    • Requests a new one-time code for the user's phone number.

      Parameters

      • Optionalpayload: CustomOptions

        Optional custom parameters to send with the request.

      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". Auth0 responds by rendering this screen again. If a captcha is required, it sends the user back to the login-id screen instead (signup-id if the user started from signup) to complete the captcha. Either way the browser loads a new page, and the current JavaScript context, including component state and timers, is lost.

      Code after await resendOTP() may still run, but anything it sets up, such as a "code sent" message or a countdown, is gone after the reload. If the SMS can't be sent, for example because of a rate limit, Auth0 renders this screen again without an error. Only extensibility errors (such as an error from an Action) and unexpected failures appear in transaction.errors (or useErrors() in React) on the reloaded page. The returned promise doesn't reject.

      To add a cooldown between resends, use resendManager() (or useResend() in React). It stores its countdown in localStorage, so the countdown survives the reload.

    • Gets resend functionality with timeout management for this screen

      Parameters

      Returns ResendControl