Authentication using email only
Project description
settings.py:
INSTALLED_APPS = [ ... 'django_auth_email', ... ]
And run command:
./manage.py makemigrations django_auth_email ./manage.py migrate
Will be create a table in the DB – django_auth_email_option. Model:
class Option(models.Model): user = models.ForeignKey(User) code = models.CharField(max_length=56) expiry = models.DateTimeField()
Sign-in/up:
>>> from django_auth_email.models import DEAMng >>> auth = DEAMng() >>> code = auth.set_code(form.instance.email) >>> print(code) c0fca3619e2a0692a0f7bc79388cc51b5c805b22f5718e342bafd986
Authorization:
>>> check = DEAMng() >>> if check.is_valid(code): >>> check.login(request)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-auth-email-0.0.1a5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e95da74103889f1cfeb386d9772f497977b76b3e14a5525ed9f1f1c3e4cbbe25 |
|
MD5 | db037f44e820c18197d1f058e3246cf5 |
|
BLAKE2b-256 | d46c7b0b1e97fda391f0dcbd1bcedda8ebdeb44b4fb53c51271aef4b1ecd96f3 |