{% load i18n %} {% load Pleio_templatetags %}

{% block title %}{% trans "Two-Factor Authentication" %}{% endblock %}

{% if 2FA.state == 'default' %} {% if 2FA.default_device %}

{% trans "Backup Tokens" %}

{% trans "Tokens will be generated by your token generator." %}

{% blocktrans %}If you don't have any device with you, you can access your account using backup tokens.{% endblocktrans %} {% blocktrans count counter=2FA.backup_tokens %} You have only one backup token remaining. {% plural %} You have {{ counter }} backup tokens remaining. {% endblocktrans %}

{% endif %} {% endif %} {% if 2FA.state == 'setup' %}
{% csrf_token %}

{% trans "Enable Two-factor Authentication" %}

{% blocktrans %}Scan the QR-code below with your token generator and enter the generated token.{% endblocktrans %}

QR Code


{{ 2FA.form.errors.token }} {{ 2FA.form.token.label_tag }} {{ 2FA.form.token }}

{% blocktrans %}Don't have a token generator? Try Google Authenticator or Authy.{% endblocktrans %}

{% endif %} {% if 2FA.state == 'codes' %}
{% csrf_token %}{{ form }}
{% endif %} {% if 2FA.state == 'disable' %}
{% csrf_token %}

{% trans "Disable Two-factor Authentication" %}

{% blocktrans %}You are about to disable two-factor authentication. This compromises your account security, are you sure?{% endblocktrans %}

{% endif %} {% if 2FA.show_state %}
{% if 2FA.default_device %}

{% trans "Disable Two-Factor Authentication" %}

{% include_asset "images/2fa.svg" %}
{% blocktrans %}However we strongly discourage you to do so, you can also disable two-factor authentication for your account.{% endblocktrans %}
{% else %}

{% trans "Enable Two-Factor Authentication" %}

{% include_asset "images/2fa.svg" %}
{% blocktrans %}Two-factor authentication is not enabled for your account. Enable two-factor authentication for enhanced account security.{% endblocktrans %}
{% csrf_token %}
{% endif %}
{% endif %}