enrollTotp method

Future<EnrollmentChallenge> enrollTotp()

Initiates TOTP (authenticator app) enrollment.

Returns an EnrollmentChallenge containing the totpSecret and totpUri for the authenticator app, along with 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.enrollTotp();
// Use challenge.totpUri to display a QR code

Implementation

Future<EnrollmentChallenge> enrollTotp() =>
    Auth0FlutterWebPlatform.instance.enrollTotp(_accessToken);