AuthenticatorState class

State of the Amplify Authenticator.

Contains the form data for the Authenticator (username, password, etc.) as well as methods to sign the user in or transition to a new Authentication State.

Intended to be used within custom UIs for the Amplify Authenticator.

Inheritance

Constructors

AuthenticatorState(StateMachineBloc _authBloc, {required DialCode defaultDialCode})

Properties

address ← String
no getter
attributeKeyToVerify ↔ CognitoUserAttributeKey
getter/setter pair
authAttributes → Map<CognitoUserAttributeKey, String>
final
authBloc → StateMachineBloc?
no setter
birthdate ← String
no getter
confirmationCode ↔ String
The value for the confirmation code form field
getter/setter pair
currentStep → AuthenticatorStep
The current step of the authentication flow (signIn, signUp, confirmSignUp, etc.)
no setter
defaultDialCode → DialCode
final
dialCode ↔ DialCode
The value for the country code portion of the phone number field
getter/setter pair
email ← String
no getter
familyName ← String
no getter
formKey → GlobalKey<FormState>
The key used for all Authenticator forms
no setter
gender ← String
no getter
givenName ← String
no getter
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
isBusy → bool
Indicates if the form is currently in a loading state
no setter
locale ← String
no getter
mfaEmail ↔ String
The value for the email MFA setup form field
getter/setter pair
middleName ← String
no getter
name ← String
no getter
newPassword ↔ String
The value for the new password form field
getter/setter pair
nickname ← String
no getter
password ↔ String
The value for the password form field
getter/setter pair
passwordConfirmation ↔ String
The value for the password confirmation form field
getter/setter pair
phoneNumber ← String
no getter
picture ← String
no getter
preferredUsername ← String
no getter
profile ← String
no getter
publicChallengeParams ↔ Map<String, String>
The publicChallengeParameters received from the CreateAuthChallenge lambda during custom auth
getter/setter pair
rememberDevice ↔ bool
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedMfaMethod ↔ MfaType?
The value for the MFA selection form field
getter/setter pair
totpSetupDetails → TotpSetupDetails?
no setter
totpSetupUri → Uri?
no setter
updatedAt ← String
no getter
username ↔ String
The value for the username form field
getter/setter pair
usernameSelection ↔ UsernameSelection
The username type to use during sign up and sign in for configurations that allow email OR phone number.
getter/setter pair
website ← String
no getter
zoneInfo ← String
no getter

Methods

abortSignIn() → void
Reset the authentication flow if initiated
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
changeStep(AuthenticatorStep step, {bool reset = true}) → void
Change to a new step in the authentication flow.
confirmEmailMfa() → Future<void>
complete Email MFA setup using the values for confirmationCode
confirmResetPassword() → Future<void>
Completes the reset password process with confirmationCode, username, and newPassword
confirmSignInCustomAuth() → Future<void>
Complete custom auth form using the values for confirmationCode, rememberDevice, and any user attributes.
confirmSignInMFA() → Future<void>
Complete MFA using the values for confirmationCode, rememberDevice, and any user attributes.
confirmSignInNewPassword() → Future<void>
Complete the force password change with newPassword
confirmSignUp() → Future<void>
Confirm sign up with confirmationCode, username, and password
confirmTotp() → Future<void>
Complete TOTP setup using the values for confirmationCode and any user attributes.
confirmVerifyUser(CognitoUserAttributeKey userAttributeKey) → Future<void>
continueEmailMfaSetup() → Future<void>
Complete MFA setup using the values for confirmationCode
continueSignInWithMfaSelection() → Future<void>
Select MFA preference using the values for selectedMfaMethod
continueSignInWithMfaSetupSelection() → Future<void>
Select MFA setup preference using the values for selectedMfaMethod
dispose() → void
Discards any resources used by the object.
inherited
expectTotpUri() → Uri
getAttribute(CognitoUserAttributeKey key) → String?
nextBlocEvent({BlocEventPredicate? where}) → Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
resendSignUpCode() → Future<void>
Resend sign up code for the user with the given username
resetCode() → void
resetPassword() → Future<void>
Initiates the reset password process for the user with the given username
setCustomAttribute(CognitoUserAttributeKey key, String value) → void
signIn() → Future<void>
Sign in with username, and password
signInWithProvider(AuthProvider provider) → Future<void>
Perform social sign in with the given provider
signOut() → Future<void>
Sign out the currecnt user
signUp() → Future<void>
Sign up with username, password and any user attributes
skipVerifyUser() → void
toString() → String
A string representation of this object.
inherited
verifyUser() → Future<void>

Operators

operator ==(Object other) → bool
The equality operator.
inherited