aws-cdk-lib.aws_cognito.UserVerificationConfig

interface UserVerificationConfig

LanguageType name
.NETAmazon.CDK.AWS.Cognito.UserVerificationConfig
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscognito#UserVerificationConfig
Javasoftware.amazon.awscdk.services.cognito.UserVerificationConfig
Pythonaws_cdk.aws_cognito.UserVerificationConfig
TypeScript (source)aws-cdk-lib » aws_cognito » UserVerificationConfig

User pool configuration for user self sign up.

Example

new cognito.UserPool(this, 'myuserpool', {
  // ...
  selfSignUpEnabled: true,
  userVerification: {
    emailSubject: 'Verify your email for our awesome app!',
    emailBody: 'Thanks for signing up to our awesome app! Your verification code is {####}',
    emailStyle: cognito.VerificationEmailStyle.CODE,
    smsMessage: 'Thanks for signing up to our awesome app! Your verification code is {####}',
  },
});

Properties

NameTypeDescription
emailBody?stringThe email body template for the verification email sent to the user upon sign up.
emailStyle?VerificationEmailStyleEmails can be verified either using a code or a link.
emailSubject?stringThe email subject template for the verification email sent to the user upon sign up.
smsMessage?stringThe message template for the verification SMS sent to the user upon sign up.

emailBody?

Type: string (optional, default: 'The verification code to your new account is {####}' if VerificationEmailStyle.CODE is chosen, 'Verify your account by clicking on {##Verify Email##}' if VerificationEmailStyle.LINK is chosen.)

The email body template for the verification email sent to the user upon sign up.

See https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-message-templates.html to learn more about message templates.


emailStyle?

Type: VerificationEmailStyle (optional, default: VerificationEmailStyle.CODE)

Emails can be verified either using a code or a link.

Learn more at https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-email-verification-message-customization.html


emailSubject?

Type: string (optional, default: 'Verify your new account')

The email subject template for the verification email sent to the user upon sign up.

See https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-message-templates.html to learn more about message templates.


smsMessage?

Type: string (optional, default: 'The verification code to your new account is {####}' if VerificationEmailStyle.CODE is chosen, not configured if VerificationEmailStyle.LINK is chosen)

The message template for the verification SMS sent to the user upon sign up.

See https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-message-templates.html to learn more about message templates.