Skip to main content

Adds two factor authentication to django-allauth.

Project description

django-allauth-2f2a is a port of django-allauth-2fa that adds two-factor authentication to django-allauth and intends to continue active development of the code. The current goals include generating SVG codes as files to allow stricter content security policies, configuration of form classes used by the app to allow subclassing forms for use with django-crispy-forms, and improved CI and testing.

Features

Compatibility

django-allauth-2f2a will only maintain compatibility with supported versions of Django and python and recent, secure versions of django-allauth, and django-otp, currently:

Running Tests

Currently, tests can be run using the standard Django testing facility:

python manage.py test

or by running tox:

tox

Project tests will be moved to pytest in the future.

Running the Test Project

The test project can also be used as a minimal example using the following:

# Migrate the SQLite database first.
DJANGO_SETTINGS_MODULE=tests.settings python manage.py migrate
# Run the server with debug.
DJANGO_SETTINGS_MODULE=tests.settings python manage.py runserver
# Run the shell.
DJANGO_SETTINGS_MODULE=tests.settings python manage.py shell

Contributing

  • Create an issue/pull request. Check the roadmap for ideas.

  • All tox targets should pass. That includes all tests in all supported environments and all the linting checks (black, isort, flake8 and flake8-docstrings).

  • Test coverage should be 100%. New features should have new tests.

Roadmap

  • implement other OTP/2FA methods in addition to TOTP (see https://github.com/valohai/django-allauth-2fa/issues/23)

    • static

    • HOTP

    • YubiKey

    • Twilio

  • clarify code comments

  • clarify documentation and improve examples

  • publish documentation

  • include docstrings in published documentation

  • complete meaningful test coverage (make sure the 100% is not just the number)

  • generate SVG codes as files (completed 0.9.0)

  • allow configurable form classes (make your forms crispy; completed 0.9.0)

  • complete test coverage (completed 0.9.0)

  • require black, flake8-docstrings, pydocstyle, isort, pccc, and pre-commit (completed 0.8.1)

Author

django-allauth-2fa was originally created by Víðir Valberg Guðmundsson (@valberg) of Percipient Networks. All modifications after the port to django-allauth-2f2a are created and maintained by Jeremy A Gray at FQS.

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-allauth-2f2a-0.9.1.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

django_allauth_2f2a-0.9.1-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file django-allauth-2f2a-0.9.1.tar.gz.

File metadata

  • Download URL: django-allauth-2f2a-0.9.1.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.2

File hashes

Hashes for django-allauth-2f2a-0.9.1.tar.gz
Algorithm Hash digest
SHA256 a9cce4b3558ad19694d05259e360654a9b2252b2748c91fbbfeb7d5e321332f2
MD5 5671e45e46d1273c63f7d5921a0a263d
BLAKE2b-256 3f1f1f9ebcedc208d795e9848d5d19ae7e3578758e157bf906dea5783243bb35

See more details on using hashes here.

File details

Details for the file django_allauth_2f2a-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: django_allauth_2f2a-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.2

File hashes

Hashes for django_allauth_2f2a-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0fe2fbea11c79b1c12a5bde83a22c29107b6627f2600e7f79d04c053b98354df
MD5 2d7bf08bcce106fd3fdf1ea1e1b2b83d
BLAKE2b-256 e9352e9486db95099d7bfa21b4839de13e30c2ad9cdcefb5516c1e331dc202b5

See more details on using hashes here.

Supported by

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