GoTrueMFAApi class
Constructors
- GoTrueMFAApi({required GoTrueClient client, required GotrueFetch fetch})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
challenge(
{required String factorId}) → Future< AuthMFAChallengeResponse> - Prepares a challenge used to verify that a user has access to a MFA factor.
-
challengeAndVerify(
{required String factorId, required String code}) → Future< AuthMFAVerifyResponse> - Helper method which creates a challenge and immediately uses the given code to verify against it thereafter.
-
enroll(
{FactorType factorType = FactorType.totp, String? issuer, String? friendlyName}) → Future< AuthMFAEnrollResponse> -
Starts the enrollment process for a new Multi-Factor Authentication (MFA) factor.
This method creates a new
unverified
factor. To verify a factor, present the QR code or secret to the user and ask them to add it to their authenticator app. -
getAuthenticatorAssuranceLevel(
) → AuthMFAGetAuthenticatorAssuranceLevelResponse - Returns the Authenticator Assurance Level (AAL) for the active session.
-
listFactors(
) → Future< AuthMFAListFactorsResponse> - Returns the list of MFA factors enabled for this user.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unenroll(
String factorId) → Future< AuthMFAUnenrollResponse> - Unenroll removes a MFA factor.
-
verify(
{required String factorId, required String challengeId, required String code}) → Future< AuthMFAVerifyResponse> -
Verifies a code against a
challengeId
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited