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.3.2.tar.gz (35.5 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: django-j2fa-3.3.2.tar.gz
  • Upload date:
  • Size: 35.5 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.3.2.tar.gz
Algorithm Hash digest
SHA256 e4d3c668bcefc7218c5a8d7bc8dce6ef5d1115da041af5820abdd1fbde5a8419
MD5 71c4f69b259e400834b7bc9126d6df89
BLAKE2b-256 145e7dfa183f1d2976f0a88ddb35818102006371e3f82b9e604a18cdebc6b163

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