AmplifyAuthCognito class

The AWS Cognito implementation of the Amplify Auth category.

Constructors

AmplifyAuthCognito.new({SecureStorageFactory? secureStorageFactory})
The AWS Cognito implementation of the Amplify Auth category.

Properties

hashCode int
The hash code for this object.
no setterinherited
logger → AmplifyLogger
The logger for this class.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
runtimeTypeName String
The string value of runtimeType, saving a runtime lookup and preventing obfuscation during web compilation.
no setter
stateMachine ↔ CognitoAuthStateMachine
The underlying state machine, for use in subclasses.
getter/setter pairinherited

Methods

addPlugin({required AmplifyAuthProviderRepository authProviderRepo}) Future<void>
Called when the plugin is added to the category.
clearFederationToIdentityPool() Future<void>
Clears the federation previously retrieved via federateToIdentityPool.
inherited
close() Future<void>
Closes the resource and all connected objects.
inherited
configure({AmplifyOutputs? config, required AmplifyAuthProviderRepository authProviderRepo}) Future<void>
Configures the plugin using the registered config.
confirmResetPassword({required String username, required String newPassword, required String confirmationCode, ConfirmResetPasswordOptions? options}) Future<CognitoResetPasswordResult>
Completes the password reset process given a username, new password, and the confirmation code which was sent calling resetPassword.
inherited
confirmSignIn({required String confirmationValue, ConfirmSignInOptions? options}) Future<CognitoSignInResult>
Confirm the current sign in with the confirmationValue provided by the user.
inherited
confirmSignUp({required String username, required String confirmationCode, ConfirmSignUpOptions? options}) Future<CognitoSignUpResult>
Confirm the current sign up for username with the confirmationCode provided by the user.
inherited
confirmUserAttribute({required AuthUserAttributeKey userAttributeKey, required String confirmationCode, ConfirmUserAttributeOptions? options}) Future<ConfirmUserAttributeResult>
Confirms a user attribute update initiated with either updateUserAttribute or updateUserAttributes.
inherited
deleteUser() Future<void>
Deletes the current authenticated user.
inherited
federateToIdentityPool({required String token, required AuthProvider provider, FederateToIdentityPoolOptions? options}) Future<FederateToIdentityPoolResult>
Federate to a Cognito Identity pool using an external identity provider previously registered for the identity pool.
inherited
fetchAuthSession({FetchAuthSessionOptions? options}) Future<CognitoAuthSession>
Fetch the current auth session.
inherited
fetchCurrentDevice() Future<CognitoDevice>
Retrieves the current device.
inherited
fetchDevices() Future<List<CognitoDevice>>
Retrieves all tracked devices for the current user.
inherited
fetchMfaPreference() Future<UserMfaPreference>
Fetches the MFA preference for the current user.
inherited
fetchUserAttributes({FetchUserAttributesOptions? options}) Future<List<AuthUserAttribute>>
Fetch all user attributes associated with the current user.
inherited
forgetDevice([AuthDevice? device]) Future<void>
Forgets the current device.
inherited
getCurrentUser({GetCurrentUserOptions? options}) Future<CognitoAuthUser>
Retrieves the current active user.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rememberDevice() Future<void>
Remembers the current device.
inherited
resendSignUpCode({required String username, ResendSignUpCodeOptions? options}) Future<CognitoResendSignUpCodeResult>
Resends the code that is used to confirm the user's account after sign up.
inherited
resetPassword({required String username, ResetPasswordOptions? options}) Future<CognitoResetPasswordResult>
Initiates a password reset for the user with the given username.
inherited
sendUserAttributeVerificationCode({required AuthUserAttributeKey userAttributeKey, SendUserAttributeVerificationCodeOptions? options}) Future<SendUserAttributeVerificationCodeResult>
Sends a confirmation code for the existing value for the given userAttributeKey.
inherited
setUpTotp({TotpSetupOptions? options}) Future<TotpSetupDetails>
Initiates setup of a time-based one-time passcode (TOTP) MFA method for the current user.
inherited
signIn({required String username, String? password, SignInOptions? options}) Future<CognitoSignInResult>
Initiate sign in for user with username and optional password.
inherited
signInWithWebUI({AuthProvider? provider, SignInWithWebUIOptions? options}) Future<CognitoSignInResult>
Initiate sign in for a web-based flow, e.g. a social provider like Facebook, Google, or Apple.
inherited
signOut({SignOutOptions? options}) Future<CognitoSignOutResult>
Sign the user out of the current device.
inherited
signUp({required String username, required String password, SignUpOptions? options}) Future<CognitoSignUpResult>
Create a new user with the given username and password.
toString() String
A string representation of this object.
inherited
updateMfaPreference({MfaPreference? sms, MfaPreference? totp, MfaPreference? email}) Future<void>
Updates the MFA preference for the current user.
inherited
updatePassword({required String oldPassword, required String newPassword, UpdatePasswordOptions? options}) Future<UpdatePasswordResult>
Update the password of the current user.
inherited
updateUserAttribute({required AuthUserAttributeKey userAttributeKey, required String value, UpdateUserAttributeOptions? options}) Future<UpdateUserAttributeResult>
Updates a single user attribute.
inherited
updateUserAttributes({required List<AuthUserAttribute> attributes, UpdateUserAttributesOptions? options}) Future<Map<CognitoUserAttributeKey, UpdateUserAttributeResult>>
Updates multiple user attributes at once.
inherited
verifyTotpSetup(String totpCode, {VerifyTotpSetupOptions? options}) Future<void>
Completes setup of a TOTP MFA application.
inherited

Operators

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

Constants

pluginKey → const AuthPluginKey<AmplifyAuthCognito>
A plugin key which can be used with Amplify.Auth.getPlugin to retrieve a Cognito-specific Auth category interface.