Skip to main content

2-Factor Authentication for Django projects

Project description

django-j2fa

2-factor SMS authentication for Django projects. Supports Django 3.0.

Install

  1. Add ‘j2fa’ to project settings INSTALLED_APPS

  2. Add j2fa.middleware.Ensure2FactorAuthenticatedMiddleware to project settings MIDDLEWARE (after session middleware)

  3. Make sure user.profile.phone 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’

Static Code Analysis

The library passes both prospector and mypy checking. To install:

pip install prospector pip install mypy

To analyze:

prospector mypy .

Project details


Download files

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

Source Distribution

django-j2fa-3.2.2.tar.gz (35.4 kB view details)

Uploaded Source

File details

Details for the file django-j2fa-3.2.2.tar.gz.

File metadata

  • Download URL: django-j2fa-3.2.2.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for django-j2fa-3.2.2.tar.gz
Algorithm Hash digest
SHA256 36f7ff11dfab513885a560115621f7b717e796e102f104eeb1a86eb827168ada
MD5 01ee7bff7f0680c5dc394258eb491b0f
BLAKE2b-256 53567f2abe797a47b9a463a9f2730be41b555bbf56cb1187ee1819b47feae1ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page