If you want your user to sign in using email addresses, you setup alias when creating your user pool.
Cognito will do the following.
- During sign-up, treat your
usernameparameter as an email, or a phone number and populate
- Internally, generates a UUID for
usernamefield, the same as
- Allow user to sign in with their email or phone_number, which must be unique across the pool
Confusion in names is typical in AWS. This feature is called “alias” in the docs, is an option in console, and is called “UsernameAttributes” in CloudFormation.
UserPool: Type: AWS::Cognito::UserPool Properties: AutoVerifiedAttributes: - email UsernameAttributes: - email UsernameConfiguration: CaseSensitive: false