{% extends "base.html" %} {% from "components/ui.html" import ago, card, copy_button, csrf_field, dialog_button, dialog_buttons, empty, form_dialog, icon, related, row_form, tick, tick_all, toggle with context %} {% from "components/factor.html" import second_step with context %} {% block title %}Second factor ยท {{ APP_NAME }}{% endblock %} {% block heading %}Second factor{% endblock %} {% block subheading %}
Each signs you in once in place of a code of a device or a passkey, e.g. when a phone is lost. Keep them apart from your devices, in a password manager or on paper.
1. Scan this code with your authenticator app.
Or type in this key:
{{ secret }}{{ copy_button("totp-key", "Copy the key") }}The browser asks where to keep it, and for your PIN, fingerprint or face.
{% endcall %} {% endif %} {% set can_add = not qr and devices | length < max_devices %} {% call related("Authenticator app (TOTP)", count=devices | length, meta=("A code from any of them works." if devices else "Any authenticator app works."), add=("Add a device" if can_add else None), add_dialog="add-device") %} {% if devices | length > 1 %} {% endif %}| {{ tick_all("devices-batch", "device") }} | {% endif %}Name | Added | Last used | Actions |
|---|---|---|---|---|
| {{ tick("devices-batch", "device", device.id, "Tick " ~ device.name) }} | {% endif %}{{ device.name }} | {{ ago(device.created_at) }} | {{ ago(device.last_used_at) }} | {{ toggle("rename-" ~ device.id, "Rename", "pencil", name="Rename " ~ device.name) }} {{ dialog_button("remove-" ~ device.id, "Remove", name="Remove " ~ device.name) }} |
| Name | Added | Last used | Actions |
|---|---|---|---|
| {{ key.name }} | {{ ago(key.created_at) }} | {{ ago(key.last_used_at) }} | {{ toggle("rename-" ~ key.id, "Rename", "pencil", name="Rename " ~ key.name) }} {{ dialog_button("remove-" ~ key.id, "Remove", name="Remove " ~ key.name) }} |