# SignInAliases

Struct · Stable

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

- Source: [`aws-cognito/lib/user-pool.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-cognito/lib/user-pool.ts#L35)

## Example

TypeScript:

```ts
new cognito.UserPool(this, 'myuserpool', {
  // ...
  // ...
  signInAliases: { username: true, email: true },
  autoVerify: { email: true, phone: true },
});
```

Python:

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

Java:

```java
UserPool.Builder.create(this, "myuserpool")
        // ...
        // ...
        .signInAliases(SignInAliases.builder().username(true).email(true).build())
        .autoVerify(AutoVerifiedAttrs.builder().email(true).phone(true).build())
        .build();
```

C#:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
new UserPool(this, "myuserpool", new UserPoolProps {
    // ...
    // ...
    SignInAliases = new SignInAliases { Username = true, Email = true },
    AutoVerify = new AutoVerifiedAttrs { Email = true, Phone = true }
});
```

Go:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
cognito.NewUserPool(this, jsii.String("myuserpool"), &UserPoolProps{
	// ...
	// ...
	SignInAliases: &SignInAliases{
		Username: jsii.Boolean(true),
		Email: jsii.Boolean(true),
	},
	AutoVerify: &AutoVerifiedAttrs{
		Email: jsii.Boolean(true),
		Phone: jsii.Boolean(true),
	},
})
```

## Properties

- `email`: boolean = false — Whether a user is allowed to sign up or sign in with an email address.

- `phone`: boolean = false — Whether a user is allowed to sign up or sign in with a phone number.

- `preferredUsername`: boolean = false — 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`.

- `username`: boolean = true — Whether user is allowed to sign up or sign in with a username.
