<#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>
${msg("configureAuthenticators")}
<#else>
${msg("configureAuthenticators")}
<#list totp.otpCredentials as credential>
<#if totp.otpCredentials?size gt 1>
${msg("mobile")} | ${credential.id} | ${credential.userLabel!} |

<#else>

1. ${msg("totpStep1")}

   <#list totp.policy.supportedApplications as app>
   - ${app}
<#if mode?? && mode = "manual">

2. ${msg("totpManualStep2")}

   ${totp.totpSecretEncoded}

   ${msg("totpScanBarcode")}

3. ${msg("totpManualStep3")}

   - ${msg("totpType")}: ${msg("totp." + totp.policy.type)}
   - ${msg("totpAlgorithm")}: ${totp.policy.getAlgorithmKey()}
   - ${msg("totpDigits")}: ${totp.policy.digits}
   <#if totp.policy.type = "totp">
   - ${msg("totpInterval")}: ${totp.policy.period}
   <#elseif totp.policy.type = "hotp">
   - ${msg("totpCounter")}: ${totp.policy.initialCounter}
<#else>

4. ${msg("totpStep2")}

   ${msg("totpUnableToScan")}

5. ${msg("totpStep3")}

   ${msg("totpStep3DeviceName")}

${msg("authenticatorCode")} *
${msg("totpDeviceName")} <#if totp.otpCredentials?size gte 1>*