Skip to content
v2.274.0

AllowedFirstAuthFactors Struct ​

The types of authentication that you want to allow for users' first authentication prompt.

Example ​

ts
new cognito.UserPool(this, 'myuserpool', {
  signInPolicy: {
    allowedFirstAuthFactors: { password: true, passkey: true },
  },
  passkeyRelyingPartyId: 'auth.example.com',
  passkeyUserVerification: cognito.PasskeyUserVerification.REQUIRED,
});

Properties ​

emailOtpoptionalbooleanemail_otpoptionalboolemailOtpoptionalBooleanEmailOtpoptionalboolEmailOtpoptional*bool= false#
Whether the email message one-time password is allowed.
passkeyoptionalbooleanpasskeyoptionalboolpasskeyoptionalBooleanPasskeyoptionalboolPasskeyoptional*bool= false#
Whether the Passkey (WebAuthn) is allowed.
passwordbooleanpasswordboolpasswordBooleanPasswordboolPassword*boolrequired#
Whether the password authentication is allowed.

This must be true.

smsOtpoptionalbooleansms_otpoptionalboolsmsOtpoptionalBooleanSmsOtpoptionalboolSmsOtpoptional*bool= false#
Whether the SMS message one-time password is allowed.