1 Answer
- Newest
- Most votes
- Most comments
1
Hi,
To add all three attributes email, phone_number, preferred_username as sign in options while adding auth category using Amplify CLI, you would have to add all three under aliasAttributes in cli-inputs.json and remove usernameAttributes and autoVerifiedAttributes keys. Steps for the same are mentioned below.
-
Select
Email or Phone Numberas the sign in option while adding auth. -
Under
amplify/backend/auth/<auth-name>/cli-inputs.json, make the following changes.a. "aliasAttributes": ["email", "phone_number", "preferred_username"],
b. Remove
usernameAttributesandautoVerifiedAttributes -
Execute "amplify push".
Reference :- https://github.com/aws-amplify/amplify-cli/issues/1546
Relevant content
- AWS OFFICIALUpdated 4 years ago

Hi Mukul_V, Thank you for sharing your response. I would like to mention that I have successfully configured my end.
Hi @Mukul_V, It works fine in Amplify Gen1. Now that we've moved to Amplify Gen2, how can we implement the same process?