<#import "template.ftl" as layout> <@layout.mainLayout active='totp' bodyClass='totp'; section>

${msg("authenticatorTitle")}

<#if totp.otpCredentials?size == 0>
* ${msg("requiredFields")}
<#if totp.enabled> <#if totp.otpCredentials?size gt 1> <#else> <#list totp.otpCredentials as credential> <#if totp.otpCredentials?size gt 1>
${msg("configureAuthenticators")}
${msg("configureAuthenticators")}
${msg("mobile")}${credential.id} ${credential.userLabel!}
<#else>
  1. ${msg("totpStep1")}

  2. <#if mode?? && mode = "manual">
  3. ${msg("totpManualStep2")}

    ${totp.totpSecretEncoded}

    ${msg("totpScanBarcode")}

  4. ${msg("totpManualStep3")}

  5. <#else>
  6. ${msg("totpStep2")}

    Figure: Barcode

    ${msg("totpUnableToScan")}

  7. ${msg("totpStep3")}

    ${msg("totpStep3DeviceName")}


*
<#if totp.otpCredentials?size gte 1>*