challenge method
Prepares a challenge used to verify that a user has access to a MFA factor.
factorId
System assigned identifier for authenticator device as returned by enroll
Implementation
Future<AuthMFAChallengeResponse> challenge({
required String factorId,
}) async {
final session = _client.currentSession;
final data = await _fetch.request(
'${_client._url}/factors/$factorId/challenge',
RequestMethodType.post,
options: GotrueRequestOptions(
headers: _client._headers,
jwt: session?.accessToken,
),
);
return AuthMFAChallengeResponse.fromJson(data);
}