Skip to main content

A Django deployment package for all hosting types.

Project description

Documentation Status https://travis-ci.org/MicroPyramid/django-mfa.svg?branch=master Latest Release https://coveralls.io/repos/github/MicroPyramid/django-mfa/badge.svg?branch=master Code Health https://img.shields.io/github/license/micropyramid/django-mfa.svg

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 Django versions >=1.10 (including at least Django 2.0.7) Documentation is available at readthedocs(http://django-mfa.readthedocs.io/en/latest/)

Quick start

Installation

The Git repository can be cloned with this command:

git clone https://github.com/MicroPyramid/django-mfa

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

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

Settings

  1. Add app name in settings.py:

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

    MIDDLEWARE = [
       '....................................',
       'django_mfa.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 = [
    ...

    url(r'^settings/', include('django_mfa.urls')),
]

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

You can try it by hosting on your own or deploy to Heroku with a button click.

https://www.herokucdn.com/deploy/button.svg

Visit our Django web development page Here

We welcome your feedback and support, raise github ticket if you want to report a bug. Need new features? Contact us here

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-mfa-2.0.tar.gz (22.6 kB view details)

Uploaded Source

File details

Details for the file django-mfa-2.0.tar.gz.

File metadata

  • Download URL: django-mfa-2.0.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for django-mfa-2.0.tar.gz
Algorithm Hash digest
SHA256 09604c5181f6aa32ed594cbcb29da060685721d970d78b03d258b08fcf9cc294
MD5 52b16aa17475488f39007ebcfeab03ce
BLAKE2b-256 c59bc9ffc57e3b667e51ef29848cc36e5a0b77fc91e66c7c417a38613f27cf2c

See more details on using hashes here.

Supported by

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