updatePhone abstract method

Future<String> updatePhone({
  1. required String phone,
  2. required DeliveryMethod method,
  3. required String loginId,
  4. String? redirectUrl,
  5. required String refreshJwt,
  6. UpdateOptions? options,
})

Updates an existing user by adding a phone number.

The phone number will be updated for the user identified by loginId after it is verified via magic link. In order to do this, the user must have an active DescopeSession whose refreshJwt should be passed as a parameter to this function.

You can optionally pass the options parameter to add the new phone number as a loginId for the existing user, and to determine how to resolve conflicts if another user already exists with the same loginId. See the documentation for UpdateOptions for more details.

Important: Make sure the delivery information corresponding with the phone number enabled delivery method.

Important: Make sure a default magic link URL is configured in the Descope console, or provided by this call via redirectUrl.

Implementation

Future<String> updatePhone({required String phone, required DeliveryMethod method, required String loginId, String? redirectUrl, required String refreshJwt, UpdateOptions? options});