Package: react-wallet-kit

Defined in: react-wallet-kit/src/providers/client/Types.tsx:463

Overview

Handles the update user phone number flow.
  • This function opens a modal with the UpdatePhoneNumber component for updating and verifying the user’s phone number.
  • If a phoneNumber is provided, it will directly send an OTP request to the user and display the OTP verification modal.
  • Supports both manual entry and pre-filled phone numbers, as well as custom modal titles and subtitles.
  • Uses the updatePhoneNumberContinue helper to manage the OTP flow, verification, and update logic.
  • After successful verification and update, the user details state is refreshed and an optional success page can be shown.
  • Supports customizing the duration of the success page after update.
  • Throws a TurnkeyError if the client is not initialized, no active session is found, SMS OTP is not enabled, or if there is an error updating the phone number.

Parameters

params
object

Response

A successful response returns the following fields:
returns
string
required
A promise that resolves to the userId of the user that was changed.