forked from 00dani/lemoncurry
Add TOTP support with django-otp
This commit is contained in:
parent
492ba744fc
commit
3f3bb05a25
5 changed files with 27 additions and 1 deletions
|
@ -30,6 +30,7 @@
|
|||
<div class="card-body">
|
||||
{% form_field form.username %}
|
||||
{% form_field form.password %}
|
||||
{% form_field form.otp_token %}
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
from django.contrib.auth import views as auth_views
|
||||
from django_otp.forms import OTPAuthenticationForm
|
||||
from lemoncurry import breadcrumbs
|
||||
|
||||
breadcrumbs.add(route='lemonauth:login', label='log in', parent='home:index')
|
||||
|
||||
login = auth_views.LoginView.as_view(
|
||||
authentication_form=OTPAuthenticationForm,
|
||||
template_name='lemonauth/login.html',
|
||||
redirect_authenticated_user=True,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue