@let url = kcContext.url; @let mode = kcContext.mode; @let messagesPerField = kcContext.messagesPerField; @let stateChecker = kcContext.stateChecker; @let totp = kcContext.totp;

{{ i18n.msgStr('authenticatorTitle') }}

@if (totp.otpCredentials.length) {
* {{ i18n.msgStr('requiredFields') }}
}
@if (totp.enabled) { @if (totp.otpCredentials.length > 1) { } @else { } @for (credential of totp.otpCredentials; track credential; let index = $index) { @if (totp.otpCredentials.length > 1) { } }
{{ i18n.msgStr('configureAuthenticators') }}
{{ i18n.msgStr('configureAuthenticators') }}
{{ i18n.msgStr('mobile') }}{{ credential.id }}{{ credential.userLabel || '' }}
} @else {

  1. {{ i18n.msgStr('totpStep1') }}

      @for (app of totp.supportedApplications; track app) {
    • {{ i18n.advancedMsgStr(app) }}
    • }
  2. @if (mode && mode === 'manual') {
  3. {{ i18n.msgStr('totpManualStep2') }}

    {{ totp.totpSecretEncoded }}

    {{ i18n.msgStr('totpScanBarcode') }}

  4. {{ i18n.msgStr('totpManualStep3') }}

    • {{ i18n.msgStr('totpType') }}: {{ i18n.msgStr($any('totp.' + totp.policy.type)) }}
    • {{ i18n.msgStr('totpAlgorithm') }}: {{ totp.policy.getAlgorithmKey() }}
    • {{ i18n.msgStr('totpDigits') }}: {{ totp.policy.digits }}
    • @if (totp.policy.type === 'totp') {
    • {{ i18n.msgStr('totpInterval') }}: {{ totp.policy.period }}
    • } @else {
    • {{ i18n.msgStr('totpCounter') }}: {{ totp.policy.initialCounter }}
    • }
  5. } @else {
  6. {{ i18n.msgStr('totpStep2') }}

    Figure: Barcode

    {{ i18n.msgStr('totpUnableToScan') }}

  7. }
  8. {{ i18n.msgStr('totpStep3') }}

    {{ i18n.msgStr('totpStep3DeviceName') }}


*
@if (messagesPerField.existsError('totp')) { }
@if (mode) { }
@if (totp.otpCredentials.length >= 1) { * }
@if (messagesPerField.existsError('userLabel')) { }
}