Skip to content
v2.274.0

AuthFlow Struct ​

Types of authentication flow.

Example ​

ts
const userPool = new cognito.UserPool(this, 'myuserpool', {
  signInPolicy: {
    allowedFirstAuthFactors: {
      password: true, // password authentication must be enabled
      emailOtp: true, // enables email message one-time password
      smsOtp: true,   // enables SMS message one-time password
      passkey: true,  // enables passkey sign-in
    },
  },
});

// You should also configure the user pool client with USER_AUTH authentication flow allowed
userPool.addClient('myclient', {
  authFlows: { user: true },
});

Properties ​

adminUserPasswordbooleanadmin_user_passwordbooladminUserPasswordBooleanAdminUserPasswordboolAdminUserPassword*bool= false#
Enable admin based user password authentication flow.
custombooleancustomboolcustomBooleanCustomboolCustom*bool= false#
Enable custom authentication flow.
userbooleanuserbooluserBooleanUserboolUser*bool= false#
Enable Choice-based authentication.
userPasswordbooleanuser_passwordbooluserPasswordBooleanUserPasswordboolUserPassword*bool= false#
Enable auth using username & password.
userSrpbooleanuser_srpbooluserSrpBooleanUserSrpboolUserSrp*bool= false#
Enable SRP based authentication.