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
- Documentation
Features
Adds two-factor authentication views and workflow to django-allauth.
Supports Authenticator apps via a QR code when enabling 2FA.
Supports single-use back-up codes.
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.
Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
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.
Fork the repository on GitHub to start making your changes to the main branch (or branch off of it).
Write a test which shows that the bug was fixed or that the feature works as expected.
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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django_allauth_2fa-0.12.0.tar.gz | 10.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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 logSecurity 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.
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 logA 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.