Skip to main content
https://github.com/valohai/django-allauth-2fa/actions/workflows/ci.yml/badge.svg https://codecov.io/gh/valohai/django-allauth-2fa/branch/main/graph/badge.svg https://readthedocs.org/projects/django-allauth-2fa/badge/?version=latest

django-allauth-2fa adds two-factor authentication to versions of django-allauth older than 0.58.0.

For newer versions, you should use django-allauth’s built-in MFA support. Please see issue #189 for more information.

django-allauth is a set of Django applications which help with authentication, registration, and other account management tasks.

Source code

http://github.com/percipient/django-allauth-2fa

Documentation

https://django-allauth-2fa.readthedocs.io/

Features

Compatibility

django-allauth-2fa is _not_ compatible with django-allauth versions newer than 0.58.0.

django-allauth has a built-in MFA implementation since version 0.56.0, which is likely preferable to this one.

django-allauth-2fa attempts to maintain compatibility with supported versions of Django, django-allauth, and django-otp.

Current versions supported together is:

Django

django-allauth

django-otp

Python

4.1

0.57.2

1.2

3.8, 3.9, 3.10, 3.11

4.2

0.57.2

1.2

3.8, 3.9, 3.10, 3.11

Contributing

django-allauth-2fa was initially created by Víðir Valberg Guðmundsson (@valberg), was maintained by Percipient Networks for many years, and finally by Valohai.

Please feel free to contribute if you find django-allauth-2fa useful, but do note that you should likely be using allauth.mfa instead.

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.

  2. If you feel uncomfortable or uncertain about an issue or your changes, feel free to email support@percipientnetworks.com and we will happily help you.

  3. Fork the repository on GitHub to start making your changes to the main branch (or branch off of it).

  4. Write a test which shows that the bug was fixed or that the feature works as expected.

  5. Send a pull request and bug the maintainer until it gets merged and published.

Start contributing

Start by cloning the project with:

git clone https://github.com/valohai/django-allauth-2fa.git

The project uses hatch for building and package management. If you don’t have hatch installed, you can do so by running:

pip install hatch

Setup you virtual environment with hatch:

hatch env create

Running tests

Tests can be run using pytest

hatch run pytest

Running the test project

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

hatch run python manage.py migrate
hatch run python manage.py runserver

Metadata

Release files for django-allauth-2fa 0.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-allauth-2fa 0.12.0
File Size Uploaded Provenance
django_allauth_2fa-0.12.0.tar.gz 10.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-allauth-2fa 0.12.0
File Interpreter ABI Platform
django_allauth_2fa-0.12.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.1 kB

Release files / django_allauth_2fa-0.12.0.tar.gz

Download URL django_allauth_2fa-0.12.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4b0c4cfea9c30be7c0971421b9b1f4961a19a69af72b7b5c0c7a3dbbc2537253
BLAKE2b-256 checksum
How to use checksums
807382cce2a852e9c9f28760138b78e6ac4b1b68c8c3bbe0848603b25c086b63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 16, 2025.

Transparency log

Release files / django_allauth_2fa-0.12.0-py3-none-any.whl

Download URL django_allauth_2fa-0.12.0-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba53f47fd777d13c48842a7b779ab5ad24ad8c50f05aba98c64810263a50382d
BLAKE2b-256 checksum
How to use checksums
bf875032c23d25d4ea4dcc89eaf388e831c0c1f27c38a25997e0b5739f9b3a6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 16, 2025.

Transparency log

Security for django-allauth-2fa 0.12.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_allauth_2fa-0.12.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 16, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page