SignInAliases

class aws_cdk.aws_cognito.SignInAliases(*, email=None, phone=None, preferred_username=None, username=None)

Bases: object

The different ways in which users of this pool can sign up or sign in.

Parameters
  • email (Optional[bool]) – Whether a user is allowed to sign up or sign in with an email address. Default: false

  • phone (Optional[bool]) – Whether a user is allowed to sign up or sign in with a phone number. Default: false

  • preferred_username (Optional[bool]) – Whether a user is allowed to sign in with a secondary username, that can be set and modified after sign up. Can only be used in conjunction with USERNAME. Default: false

  • username (Optional[bool]) – Whether user is allowed to sign up or sign in with a username. Default: true

ExampleMetadata

infused

Example:

cognito.UserPool(self, "myuserpool",
    # ...
    # ...
    sign_in_aliases=cognito.SignInAliases(username=True, email=True),
    auto_verify=cognito.AutoVerifiedAttrs(email=True, phone=True)
)

Attributes

email

Whether a user is allowed to sign up or sign in with an email address.

Default

false

phone

Whether a user is allowed to sign up or sign in with a phone number.

Default

false

preferred_username

Whether a user is allowed to sign in with a secondary username, that can be set and modified after sign up.

Can only be used in conjunction with USERNAME.

Default

false

username

Whether user is allowed to sign up or sign in with a username.

Default

true