expephalon/core/forms/auth.py
Klaus-Uwe Mitterer 7708128255 Finally got all the OTP stuff working
Finalized dbsettings views
Easter egg for missing backend pages
2020-04-15 22:19:03 +02:00

16 lines
No EOL
533 B
Python

from django.forms import Form, EmailField, CharField, PasswordInput, ChoiceField
from core.helpers.otp import get_otp_choices
class LoginForm(Form):
email = EmailField()
password = CharField(widget=PasswordInput)
class OTPSelectorForm(Form):
def __init__(self, *args, **kwargs):
otp_choices = kwargs.pop('otp_choices', [])
super(OTPSelectorForm, self).__init__(*args, **kwargs)
self.fields['provider'] = ChoiceField(choices=otp_choices)
class OTPVerificationForm(Form):
token = CharField()