{% extends "baseTemplate/index.html" %} {% load static %} {# Enrolment / management page for an already-authenticated user. #} {% block title %}Two-factor authentication{% endblock %} {% block content %}

Two-factor authentication

Add a time-based one-time code to {{ userName }} so a stolen password alone cannot sign in.

{% if otpEnabled %}Enabled{% else %}Not enabled{% endif %}
{% if otpEnabled %}

Disable two-factor authentication

Your password is required. Disabling removes the stored secret — re-enabling later issues a new one, so you will need to scan a new QR code.

{% else %}

Set up two-factor authentication

You will need an authenticator app such as Google Authenticator, Authy, or 1Password.

  1. Scan this QR code with your authenticator app.
  2. Cannot scan? Enter this key manually:
  3. Enter the 6-digit code it shows to confirm.
Two-factor QR code
{% endif %}

Before you enable this

  • Store the secret key somewhere safe. If you lose both your device and the key, an administrator with server access must clear otpEnabled for your account directly in the database.
  • The code is accepted within a one-step window, so a clock skew of more than about 30 seconds on the server or your phone will cause valid codes to be rejected.
  • Failed code attempts count toward the same lockout as failed passwords.
{% endblock %} {% block scripts %} {% endblock %}