{% extends "base.html" %} {% block title %}Two-factor authentication{% endblock %} {% block content %} {% if mode == 'verify' %}

Two-step verification

Enter the 6-digit code from your authenticator app, or one of your recovery codes.

{% if error %}
{{ error }}
{% endif %}

Lost your phone? Use a recovery code. Lost those too? Contact support. Start over

{% else %}

Two-factor authentication

A second step at login, using a code from Google Authenticator, 1Password, Authy or any TOTP app. Back to settings

{% if required and mode == 'setup' %}
Your workspace requires two-factor authentication for every member. Set it up to continue using {{ app_name }}.
{% endif %} {% if error %}
{{ error }}
{% endif %} {% if notice %}
{{ notice }}
{% endif %} {% if mode == 'setup' %}

1. Scan this code

Open your authenticator app, add an account and scan the QR code.

{{ qr|safe }}

Can't scan? Enter this key manually (time-based, 6 digits):

{{ secret_spaced }}

2. Confirm

Enter the code your app shows now to turn two-factor on. You'll then get 8 recovery codes for when your phone is unavailable.

{% elif mode == 'codes' %}

Recovery codes

Each code works once, in place of your authenticator. Store them somewhere safe (a password manager), not in email.

{% for c in codes %}{{ c }}{% if not loop.last %}
{% endif %}{% endfor %}
I've saved them
{% else %}

Status on

Enabled
{{ user.totp_enabled_at|dt }}
Recovery codes
{{ codes_left }} of 8 unused{% if codes_left <= 2 %} running low{% endif %}

New recovery codes

Replaces all existing codes. Needs a current code from your app.

Turn off

{% if required %}
Your workspace requires two-factor authentication. If you turn it off you will be asked to set it up again before using the app.
{% endif %}

{% if has_password %}Confirm with your current password.{% else %}This account has no password, so confirm with a current authenticator code.{% endif %}

{% if has_password %}
{% else %}
{% endif %}
{% endif %} {% endif %} {% endblock %}