Amplify Toolbox
    Preparing search index...
    EmailLoginSettings: (VerificationEmailWithLink | VerificationEmailWithCode) & {
        otpLogin?: boolean;
        userInvitation?: {
            emailBody?: (username: () => string, code: () => string) => string;
            emailSubject?: string;
            smsMessage?: (username: () => string, code: () => string) => string;
        };
    }

    Email login settings object.

    Type declaration

    • OptionalotpLogin?: boolean

      Enable email OTP (one-time password) login for passwordless authentication.

      When enabled, users can sign in by receiving a one-time code via email instead of using a password.

      Note: Enabling passwordless login via otpLogin automatically enables the ALLOW_USER_AUTH authentication flow in your Cognito App Client

      false
      
      // Enable email OTP login
      defineAuth({
      loginWith: {
      email: {
      otpLogin: true
      }
      }
      })
    • OptionaluserInvitation?: {
          emailBody?: (username: () => string, code: () => string) => string;
          emailSubject?: string;
          smsMessage?: (username: () => string, code: () => string) => string;
      }

      Customize the email invitation sent to users when an administrators signs them up.

      • OptionalemailBody?: (username: () => string, code: () => string) => string

        The template to the email body that is sent to the user when an administrator signs them up to the user pool.

        (username, code) => 'Your username is {username()} and temporary password is {code()}.'
        
      • OptionalemailSubject?: string

        The template to the email subject that is sent to the user when an administrator signs them up to the user pool.

        'Your temporary password'
        
      • OptionalsmsMessage?: (username: () => string, code: () => string) => string

        The template to the SMS message that is sent to the user when an administrator signs them up to the user pool.

        (username, code) => 'Your username is {username()} and temporary password is {code()}.'