{% extends "tungsten/layout/app.html" %} {% import "tungsten/components/ui.html" as ui %} {% block content %} {% set subheading = 'Protect your account with a code from your phone each time you sign in.' %} {% set breadcrumbs = [(__('Profile'), panel.url('profile')), (__('Two-factor authentication'), None)] %} {% include "tungsten/components/page-header.html" %}
{% if error %}
{{ __(error) }}
{% endif %} {% call ui.card() %}
{{ icon('shield-check' if step in ('enabled', 'codes') else 'shield-alert', 'h-6 w-6') }}

{% if step in ('enabled', 'codes') %}{{ __('Two-factor authentication is on') }}{% else %}{{ __('Two-factor authentication is off') }}{% endif %}

{% if step in ('enabled', 'codes') %}{{ __("You'll be asked for a code from your authenticator app when you sign in.") }}{% if remaining %} You have {{ remaining }} recovery codes left.{% endif %} {% else %}{{ __('Use an app like Google Authenticator, Microsoft Authenticator or 1Password.') }}{% endif %}

{% if step == 'off' %}
{% elif step == 'confirm' %}
  1. {{ __('Scan the QR code with your authenticator app.') }}
  2. {{ __('Or type this key:') }} {{ secret }}
  3. {{ __('Enter the 6-digit code the app shows.') }}
{% endif %} {% if step == 'codes' and codes %}

{{ __('Save these recovery codes') }}

{{ __("Each code works once if you lose your phone. They won't be shown again.") }}

{% endif %} {% if step in ('enabled', 'codes') %}
{% if not required %}{% endif %}
{% endif %} {% endcall %}
{% endblock %}