confirmEnrollment method
Confirms an enrollment that does not require a one-time password, namely push notification and recovery code enrollments.
Use this after calling enrollPush or enrollRecoveryCode. For factors that require an OTP (phone, email, TOTP), use verifyOtp instead.
factorType must be "push-notification" or "recovery-code".
Returns the confirmed AuthenticationMethod after successful confirmation.
id and authSession are obtained from the EnrollmentChallenge
returned by the enrollment method.
Requires an access token with the create:me:authentication_methods
scope and audience https://{domain}/me/.
Usage example
final method = await myAccount.confirmEnrollment(
id: challenge.id,
authSession: challenge.authSession,
factorType: 'push-notification',
);
Implementation
Future<AuthenticationMethod> confirmEnrollment({
required String id,
required String authSession,
required String factorType,
}) =>
Auth0FlutterWebPlatform.instance
.confirmEnrollment(_accessToken, id, authSession, factorType);