mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
use auth screen to make more clear this is about security
This commit is contained in:
parent
7719a07f19
commit
85da98a004
15
InvenTree/templates/allauth_2fa/authenticate.html
Normal file
15
InvenTree/templates/allauth_2fa/authenticate.html
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends "account/base.html" %}
|
||||
{% load i18n crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Two-Factor Authentication" %}</h1>
|
||||
|
||||
<form method="post" class="login">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{% trans 'Authenticate' %}
|
||||
</button>
|
||||
</form>
|
||||
{% endblock %}
|
32
InvenTree/templates/allauth_2fa/backup_tokens.html
Normal file
32
InvenTree/templates/allauth_2fa/backup_tokens.html
Normal file
@ -0,0 +1,32 @@
|
||||
{% extends "account/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Two-Factor Authentication Backup Tokens" %}
|
||||
</h1>
|
||||
|
||||
{% if backup_tokens %}
|
||||
{% if reveal_tokens %}
|
||||
<ul>
|
||||
{% for token in backup_tokens %}
|
||||
<li>{{ token.token }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
{% trans 'Backup tokens have been generated, but are not revealed here for security reasons. Press the button below to generate new ones.' %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% trans 'No tokens. Press the button below to generate some.' %}
|
||||
{% endif %}
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit">
|
||||
{% trans 'Generate backup tokens' %}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<a href="{% url 'two-factor-remove' %}">Disable Two Factor</a>
|
||||
|
||||
{% endblock %}
|
18
InvenTree/templates/allauth_2fa/remove.html
Normal file
18
InvenTree/templates/allauth_2fa/remove.html
Normal file
@ -0,0 +1,18 @@
|
||||
{% extends "account/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Disable Two-Factor Authentication" %}
|
||||
</h1>
|
||||
|
||||
<p>{% trans "Are you sure?" %}</p>
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit">
|
||||
{% trans 'Disable Two-Factor' %}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
36
InvenTree/templates/allauth_2fa/setup.html
Normal file
36
InvenTree/templates/allauth_2fa/setup.html
Normal file
@ -0,0 +1,36 @@
|
||||
{% extends "account/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Setup Two-Factor Authentication" %}
|
||||
</h1>
|
||||
|
||||
<h4>
|
||||
{% trans 'Step 1' %}:
|
||||
</h4>
|
||||
|
||||
<p>
|
||||
{% trans 'Scan the QR code below with a token generator of your choice (for instance Google Authenticator).' %}
|
||||
</p>
|
||||
|
||||
<img src="{{ qr_code_url }}" />
|
||||
|
||||
<h4>
|
||||
{% trans 'Step 2' %}:
|
||||
</h4>
|
||||
|
||||
<p>
|
||||
{% trans 'Input a token generated by the app:' %}
|
||||
</p>
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
{{ form.token.label }}: {{ form.token }}
|
||||
|
||||
<button type="submit">
|
||||
{% trans 'Verify' %}
|
||||
</button>
|
||||
</form>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user