2FA: Login using a TOTP token

This commit is contained in:
Raphael Michel
2016-10-08 14:57:54 +02:00
parent 5796402a2e
commit 68a9f98f23
5 changed files with 76 additions and 5 deletions

View File

@@ -0,0 +1,22 @@
{% extends "pretixcontrol/auth/base.html" %}
{% load bootstrap3 %}
{% load i18n %}
{% load staticfiles %}
{% block content %}
<form class="form-signin" action="" method="post">
{% csrf_token %}
<h3>{% trans "Welcome back!" %}</h3>
<p>
{% trans "You configured your account two require authentification with a second medium, e.g. your phone. Please enter your verification code here:" %}
</p>
<div class="form-group">
<input class="form-control" name="token" placeholder="{% trans "Token" %}"
type="number" required="required" autofocus="autofocus">
</div>
<div class="form-group buttons">
<button type="submit" class="btn btn-primary">
{% trans "Continue" %}
</button>
</div>
</form>
{% endblock %}

View File

@@ -25,7 +25,7 @@
{% if user.require_2fa %}
<span class="label label-success">{% trans "Enabled" %}</span>
<a href="{% url "control:user.settings.2fa" %}">
{% trans "Change settings" %}
{% trans "Change two-factor settings" %}
</a>
{% else %}
<span class="label label-default">{% trans "Disabled" %}</span>