aws-cdk-lib.aws_cognito.MfaSecondFactor

interface MfaSecondFactor

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

The different ways in which a user pool can obtain their MFA token for sign in.

See also: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-mfa.html

Example

new cognito.UserPool(this, 'myuserpool', {
  // ...
  mfa: cognito.Mfa.REQUIRED,
  mfaSecondFactor: {
    sms: true,
    otp: true,
  },
});

Properties

NameTypeDescription
otpbooleanThe MFA token is a time-based one time password that is generated by a hardware or software token.
smsbooleanThe MFA token is sent to the user via SMS to their verified phone numbers.

otp

Type: boolean

The MFA token is a time-based one time password that is generated by a hardware or software token.

See also: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-mfa-totp.html


sms

Type: boolean

The MFA token is sent to the user via SMS to their verified phone numbers.

See also: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-mfa-sms-text-message.html