{% extends "mfa/base_manage.html" %} {% load allauth %} {% block head_title %}Passkeys and 2FA{% endblock %} {% block content %}

Passkeys and two-factor authentication

Every account needs a passkey or an authenticator app.

{% element panel %} {% slot title %}Passkeys{% endslot %} {% slot body %} {% element p %}{% if authenticators.webauthn %}{{ authenticators.webauthn|length }} passkey{{ authenticators.webauthn|length|pluralize }} added.{% else %}No passkeys added yet.{% endif %}{% endelement %} {% endslot %} {% slot actions %} {% url 'mfa_add_webauthn' as webauthn_add_url %} {% element button href=webauthn_add_url tags="panel" %}Add a passkey{% endelement %} {% endslot %} {% if authenticators.webauthn %} {% slot actions %} {% url 'mfa_list_webauthn' as webauthn_list_url %} {% element button href=webauthn_list_url tags="panel,outline" %}Manage{% endelement %} {% endslot %} {% endif %} {% endelement %} {% element panel %} {% slot title %}Authenticator app{% endslot %} {% slot body %} {% element p %}{% if authenticators.totp %}Codes from an authenticator app are active.{% else %}No authenticator app set up.{% endif %}{% endelement %} {% endslot %} {% slot actions %} {% if authenticators.totp %} {% url 'mfa_deactivate_totp' as deactivate_url %} {% element button href=deactivate_url tags="danger,panel" %}Deactivate{% endelement %} {% else %} {% url 'mfa_activate_totp' as activate_url %} {% element button href=activate_url tags="panel,outline" %}Set up{% endelement %} {% endif %} {% endslot %} {% endelement %} {% with unused_count=authenticators.recovery_codes.get_unused_codes|length %} {% element panel %} {% slot title %}Recovery codes{% endslot %} {% slot body %} {% element p %}{% if authenticators.recovery_codes %}{{ unused_count }} unused code{{ unused_count|pluralize }}. Each one signs you in once when your passkey or app is not at hand.{% else %}Created with your first passkey or authenticator app.{% endif %}{% endelement %} {% endslot %} {% if is_mfa_enabled %} {% if authenticators.recovery_codes and unused_count %} {% slot actions %} {% url 'mfa_view_recovery_codes' as view_url %} {% element button href=view_url tags="panel,outline" %}View{% endelement %} {% endslot %} {% endif %} {% slot actions %} {% url 'mfa_generate_recovery_codes' as generate_url %} {% element button href=generate_url tags="panel,outline" %}Generate new codes{% endelement %} {% endslot %} {% endif %} {% endelement %} {% endwith %} {% endblock %}