The Authenticator component provides basic login/logout functionality for your application, as well confirmation steps for new user registration and user login. It uses the following components as children: * SignIn * ConfirmSignIn * SignUp * ConfirmSignUp * ForgotPassword Usage: `````` Config: ``` ``` | Attribute | Type | |----------------------------------------------------------|--------| | [confirmSignInConfig](#confirmsignin) | object | | [confirmSignUpConfig](#confirmsignup) | object | | [forgotPasswordConfig](#forgotpassword) | object | | [signInConfig](#signinconfig) | object | | [signUpConfig](#signupconfig) | object | | [usernameAttributes](#Sign-up/in-with-email/phone-number)| string | * The attributes above reference the config objects for the components that are nested inside Authenticator. See the individual components for details. Events: None ### SignIn The SignIn component provides your users with the ability to sign in. Usage: `````` Config: ``` ``` import vue0 from "/src/fragments/ui-legacy/sign-in-attributes.mdx"; Events: * ```AmplifyEventBus.$emit('authState', 'signedIn')```: Emitted when a user successfully signs in without answering an MFA challenge. * ```AmplifyEventBus.$emit('authState', 'confirmSignIn')```: Emitted when a user successfully provides their credentials but is then asked to answer and MFA challenge. * ```AmplifyEventBus.$emit('authState', 'forgotPassword')```: Emitted when a user clicks the 'Forgot Password' button. * ```AmplifyEventBus.$emit('authState', 'signUp')```: Emitted when a user clicks 'Back to Sign Up'. ### ConfirmSignIn The ConfirmSignIn component provides your users with the ability to answer an MFA challenge. Usage: `````` Config: ``` ``` import vue1 from "/src/fragments/ui-legacy/confirm-sign-in-attributes.mdx"; Events: * ```AmplifyEventBus.$emit('authState', 'signedIn')```: Emitted when a user successfully answers their MFA challenge. * ```AmplifyEventBus.$emit('authState', 'signIn');```: Emitted when a user clicks 'Back to Sign In'. ### SignUp The SignUp component provides your users with the ability to sign up. Usage: `````` Config: ``` ``` import vue2 from "/src/fragments/ui-legacy/sign-up-attributes.mdx"; The signUpFields array in turn consist of an array of objects, each describing a field that will appear in sign up form that your users fill out (see below). Events: * ```AmplifyEventBus.$emit('authState', 'confirmSignUp')```: Emitted when a user successfully enters their information but has not yet completed a required verification step. * ```AmplifyEventBus.$emit('authState', 'signIn')```: Emitted when a user successfully provides their information and does not need to complete a required verification step, or when they click 'Back to Sign In'. ### ConfirmSignUp The ConfirmSignUp component provides your users with the ability to verify their identity. Usage: `````` Config: ``` ``` import vue3 from "/src/fragments/ui-legacy/confirm-sign-up-attributes.mdx"; Events: * ```AmplifyEventBus.$emit('authState', 'signIn')```: Emitted when a user successfully completes their verification step or clicks 'Back to Sign In'. ### ForgotPassword The ForgotPassword component provides your users with the ability to reset their password. Usage: `````` Config: ``` ``` import vue4 from "/src/fragments/ui-legacy/forgot-password-attributes.mdx"; Events: * ```AmplifyEventBus.$emit('authState', 'signIn')```: Emitted when a user successfully resets their password or clicks 'Back to Sign In'. ### SignOut The SignOut component provides your users with the ability to sign out. Usage: `````` Config: ``` ``` import vue5 from "/src/fragments/ui-legacy/sign-out-attributes.mdx"; Events: * ```AmplifyEventBus.$emit('authState', 'signedOut')```: Emitted when a user successfully signs out. ### SetMFA The SetMFA component provides your users with the ability to set their preferred Multifactor Authentication (MFA) method. It has the ability to show three options - SMS Text Message, TOTP, or None (depending on the options that you pass into it). Usage: `````` Config: ``` ``` import vue6 from "/src/fragments/ui-legacy/set-mfa-attributes.mdx"; Events: None ### SignUp Fields The `aws-amplify-vue` SignUp component allows you to programmatically define the user input fields that are displayed to the user. Information entered into these fields will populate the user's record in your User Pool. Usage: ``` ``` #### SignUp Field Attributes import vue7 from "/src/fragments/ui-legacy/sign-up-fields.mdx"; The following example will replace all the default sign up fields with the ones defined in the `signUpFields` array. It will also indicate that the `Email` field will be used to sign up with. `MyComponent.vue`: ```html ``` ### Sign up/in with email/phone number If the user pool is set to allow email addresses/phone numbers as the username, you can then change the UI components accordingly by using `usernameAttributes`. Setting `usernameAttributes` to `email` when signing up/in with email address. Setting `usernameAttributes` to `phone_number` when signing up/in with phone number. Note: if you are using custom signUpFields to customize the `username` field, then you need to make sure either the label of that field is the same value you set in `usernameAttributes` or the key of the field is `username`. For example: ```html ```