Skip to main content

2-Factor Authentication for Django projects

Project description


2-factor SMS authentication for Django projects.


  1. Add ‘j2fa’ to project settings INSTALLED_APPS
  2. Add j2fa.middleware.Ensure2FactorAuthenticatedMiddleware to project settings MIDDLEWARE (after session middleware)
  3. Make sure resolves to phone number and user.profile.require_2fa resolves to True/False
  4. Set project settings SMS_TOKEN and SMS_SENDER_NAME
  5. Add TwoFactorAuth.as_view() to urls with name=’j2fa-obtain-auth’

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-j2fa, version 2.1.3
Filename, size & hash File type Python version Upload date
django-j2fa-2.1.3.tar.gz (27.5 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page