Skip to main content

A Django deployment package for all hosting types.

Project description

Django-mfa(Multi-factor Authentication) is a simple django package to add extra layer of security to your web application. Django-mfa is providing easiest integration to enable Multi factor authentication to your django applications. Inspired by the user experience of Google’s Authentication, django-mfa allows users to authenticate through text message(SMS) or by using token generator app like google authenticator.

We welcome your feedback on this package. If you run into problems, please raise an issue or contribute to the project by forking the repository and sending some pull requests.

This Package is compatible with the following Django versions: 4.2 and above. Documentation is available at readthedocs(http://django-mfa.readthedocs.io/en/latest/)

This package is a fork of django-mfa 2.1.0 and is compatible with Django 4.2 and above.

Quick start

Installation

The Git repository can be cloned with this command:

git clone https://github.com/nunombispo/django-mfa-2025

The django_mfa_2025 package, included in the distribution, should be placed on the PYTHONPATH.

Otherwise you can just easy_install -Z django-mfa-2025 or pip install django-mfa-2025.

Settings

  1. Add app name in settings.py:

    INSTALLED_APPS = [
       '..................',
       'django_mfa_2025',
       '..................'
    ]
  2. Add ‘django_mfa_2025.middleware.MfaMiddleware’ to your project middlewares:

    MIDDLEWARE = [
       '....................................',
       'django_mfa_2025.middleware.MfaMiddleware',
       '....................................',
    ]
  3. Optional issuer name. This name will be shown in the Authenticator App along with the username

    MFA_ISSUER_NAME = “Cool Django App”

  4. Optionally enable remember-my-browser. If enabled, the browser will be trusted for specified number of days after the user enters the code once:

    MFA_REMEMBER_MY_BROWSER = True
    MFA_REMEMBER_DAYS = 90

Urls

Add the following to your root urls.py file.

urlpatterns = [
    ...

    re_path(r'^settings/', include('django_mfa_2025.urls')),
]

Done. With these settings you have now, you will get the MFA features.

We welcome your feedback and support, raise github ticket if you want to report a bug.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

django_mfa_2025-1.0.tar.gz (25.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_mfa_2025-1.0-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

File details

Details for the file django_mfa_2025-1.0.tar.gz.

File metadata

  • Download URL: django_mfa_2025-1.0.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for django_mfa_2025-1.0.tar.gz
Algorithm Hash digest
SHA256 ca1bec6e3388d3e4cefdf4a3d8e033773333f8d8b6818d8bed5824fda67d9a7b
MD5 08b4973257afa34f0a8ae62ce7520c5f
BLAKE2b-256 b2f8887c632d537c70031f54937cdb07c4944ba7370286d4508af4f6f824d17c

See more details on using hashes here.

File details

Details for the file django_mfa_2025-1.0-py3-none-any.whl.

File metadata

  • Download URL: django_mfa_2025-1.0-py3-none-any.whl
  • Upload date:
  • Size: 34.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for django_mfa_2025-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b03c487469129d6cfe917ac0b3e5bd3bb5df80db7db41b37476a24467894a3d
MD5 08c8834532904190e58334208ed12a7a
BLAKE2b-256 7c2d547e82e529eea578c0757bbed3a6d064ce95cce9f26359a934c7865306b7

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