Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Adds two factor authentication to django-allauth

Project Description

Adds two factor authentication to django-allauth.

Installation

Install django-allauth-2fa with pip:

pip install django-allauth-2fa

Adjust your settings accordingly:

INSTALLED_APPS = (
    # ...
    'django.contrib.sites',
    'django_otp',
    'django_otp.plugins.otp_totp',
    'django_otp.plugins.otp_hotp',
    'django_otp.plugins.otp_static',
    'allauth',
    'allauth.account',
    'allauth_2fa',
)

MIDDLEWARE_CLASSES = (
    # ...
    'django_otp.middleware.OTPMiddleware',
)

TEMPLATE_CONTEXT_PROCESSORS = (
    # ...
    "allauth.account.context_processors.account",
    "allauth.socialaccount.context_processors.socialaccount",
)

ACCOUNT_ADAPTER = 'allauth_2fa.adapter.OTPAdapter'

SITE_ID = 1

Remember to migrate and set the domain and display name for your site!

Release History

Release History

This version
History Node

0.1

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting