Security & Two-Factor Authentication

{% if fa and fa.is_enabled %} {% else %}{% endif %}
Two-Factor Authentication is {% if fa and fa.is_enabled %}Enabled{% else %}Disabled{% endif %}
{% if fa and fa.is_enabled %} Active method: {{ fa.get_preferred_method_display }}  |  Backup codes remaining: {{ fa.unused_backup_count }} {% else %} This account is not protected by 2FA. {% endif %}
{% if fa and fa.is_enabled %}
{% csrf_token %}
{% endif %}
Authenticator App Google / Microsoft Authenticator
{% if fa and fa.totp_confirmed %}
Enrolled
{% csrf_token %}
{% else %}

Scan a QR code with your authenticator app. Works offline. Most secure option.

{% if totp_qr %}

Scan with your app, then enter the 6-digit code below.

Manual key: {{ totp_secret }}

{% csrf_token %}
{% else %}
{% csrf_token %}
{% endif %} {% endif %}
Email OTP Code sent to email
{% if fa and fa.email_confirmed %}
Enrolled — {{ security_user.email }}
{% csrf_token %}
{% else %}

An 8-digit code will be sent to {{ security_user.email }} each time they log in.

{% if email_otp_sent %}
{% csrf_token %}
{% csrf_token %}
{% else %}
{% csrf_token %}
{% endif %} {% endif %}
SMS OTP Code sent via text message
{% if fa and fa.sms_confirmed %}
Enrolled — {{ fa.sms_phone }}
{% csrf_token %}
{% else %}

An 8-digit code will be sent via SMS to their phone number.

{% if sms_otp_sent %}
{% csrf_token %}
{% csrf_token %}
{% else %}
{% csrf_token %}
{% endif %} {% endif %}
{% if fa and fa.is_enabled %}

Backup Codes

{% csrf_token %}

Use these if you lose access to your 2FA method. Each code works once. Store them somewhere safe.

{% if new_backup_codes %}

Save these now — they won't be shown again.

{% for code in new_backup_codes %}
{{ code }}
{% endfor %}
{% endif %}

{{ fa.unused_backup_count }} unused backup codes remaining.

{% endif %}