| 1 |
{% extends "account/base_reauthenticate.html" %} |
| 2 |
{% load i18n %} |
| 3 |
{% load allauth %} |
| 4 |
{% block reauthenticate_content %} |
| 5 |
{% url 'mfa_reauthenticate_webauthn' as action_url %} |
| 6 |
{% element form form=form method="post" action=action_url %} |
| 7 |
{% slot body %} |
| 8 |
{% csrf_token %} |
| 9 |
{% element fields form=form unlabeled=True %} |
| 10 |
{% endelement %} |
| 11 |
{{ redirect_field }} |
| 12 |
{% endslot %} |
| 13 |
{% slot actions %} |
| 14 |
{% element button id="mfa_webauthn_reauthenticate" type="submit" tags="primary,mfa,login" %} |
| 15 |
{% trans "Use a security key" %} |
| 16 |
{% endelement %} |
| 17 |
{% endslot %} |
| 18 |
{% endelement %} |
| 19 |
{{ js_data|json_script:"js_data" }} |
| 20 |
{% include "mfa/webauthn/snippets/scripts.html" %} |
| 21 |
<script data-allauth-onload="allauth.webauthn.forms.authenticateForm" type="application/json">{ |
| 22 |
"ids": { |
| 23 |
"authenticate": "mfa_webauthn_reauthenticate", |
| 24 |
"credential": "{{ form.credential.auto_id }}", |
| 25 |
"data": "js_data" |
| 26 |
} |
| 27 |
} |
| 28 |
</script> |
| 29 |
{% endblock %} |