File tree Expand file tree Collapse file tree 3 files changed +40
-1
lines changed Expand file tree Collapse file tree 3 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 1+ {% extends "mfa/authenticate.html" %}
2+ {% load allauth %}
3+ {% load allauth_ui %}
4+ {% load i18n %}
5+ {% block content %}
6+ {% trans "Two-Factor Authentication" as heading %}
7+ {% blocktranslate asvar subheading %}Your account is protected by two-factor authentication. Please enter an authenticator code:{% endblocktranslate %}
8+ {% url 'mfa_authenticate' as action_url %}
9+ {% #container heading=heading subheading=subheading %}
10+ {% translate "Activate" as button_text %}
11+ {% trans "Sign In" as button_text %}
12+ {% #form form=form url=action_url button_text=button_text %}
13+ {% csrf_token %}
14+ {% /form %}
15+ {% if "webauthn" in MFA_SUPPORTED_TYPES %}
16+ < div class ="divider "> </ div >
17+ < h2 class ="my-3 text-lg "> {% translate "Alternative options" %}</ h2 >
18+ {% #form form=webauthn_form url=action_url use_default_button="false" %}
19+ < button type ="submit " class ="btn btn-neutral "> {% trans "Use a security key" %}</ button >
20+ < a href ="{% url "account_login " %}" class="btn btn-accent "> {% trans "Cancel" %}</ a >
21+ {% csrf_token %}
22+ {% /form %}
23+ {% endif %}
24+ {% /container %}
25+ {{ js_data|json_script:"js_data" }}
26+ {% include "mfa/webauthn/snippets/scripts.html" %}
27+ {# djlint:off #}
28+ < script type ="text/javascript ">
29+ allauth . webauthn . forms . authenticateForm ( {
30+ ids : {
31+ authenticate : "mfa_webauthn_authenticate" ,
32+ credential : "{{ webauthn_form.credential.auto_id }}"
33+ } ,
34+ data : JSON . parse ( document . getElementById ( 'js_data' ) . textContent )
35+ } )
36+ </ script >
37+ {# djlint:on #}
38+ {% endblock content %}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44
55[tool .poetry ]
66name = " django-allauth-ui"
7- version = " 1.3.1 "
7+ version = " 1.3.1b2 "
88description = " "
99authors = [" Dani Hodovic <you@example.com>" ]
1010license = " MIT"
Original file line number Diff line number Diff line change 119119USERSESSIONS_TRACK_ACTIVITY = True
120120
121121MFA_SUPPORTED_TYPES = ["totp" , "webauthn" , "recovery_codes" ]
122+ MFA_TOTP_ISSUER = "AllAuth UI"
You can’t perform that action at this time.
0 commit comments