{% extends "cms/base.html" %} {% load static %} {% block title %}Security Settings{% endblock %} {% block page_title %}Security & Two-Factor Authentication{% endblock %} {% block cms_content %} {% if messages %} {% for message in messages %}
{{ message }}
{% endfor %} {% endif %}
{% 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 %} Your account is not protected. Enable 2FA to secure your CMS access. {% 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 your email
{% if fa and fa.email_confirmed %}
Enrolled — {{ request.user.email }}
{% csrf_token %}
{% else %}

An 8-digit code will be sent to {{ request.user.email }} each time you log in.

{% if email_otp_sent %}
{% 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 %}

A 6-digit code will be sent via SMS to your phone number.

{% if sms_otp_sent %}
{% 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 %} {% endblock %}