enrollPhone method

Future<EnrollmentChallenge> enrollPhone({
  1. required String phoneNumber,
  2. required PhoneType type,
})

Initiates phone enrollment with the specified phoneNumber and type.

Returns an EnrollmentChallenge containing the enrollment id and authSession needed to complete verification via verifyOtp.

Requires an access token with the create:me:authentication_methods scope and audience https://{domain}/me/.

Usage example

final challenge = await myAccount.enrollPhone(
  phoneNumber: '+1234567890',
  type: PhoneType.sms,
);

Implementation

Future<EnrollmentChallenge> enrollPhone({
  required String phoneNumber,
  required PhoneType type,
}) =>
    Auth0FlutterWebPlatform.instance
        .enrollPhone(_accessToken, phoneNumber, type);