Adds two factor authentication to django-allauth
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_allauth_2fa-0.12.0.tar.gz
.
File metadata
- Download URL: django_allauth_2fa-0.12.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b0c4cfea9c30be7c0971421b9b1f4961a19a69af72b7b5c0c7a3dbbc2537253 |
|
MD5 | da1e94bb38e9f4c247e5024b4f66a982 |
|
BLAKE2b-256 | 807382cce2a852e9c9f28760138b78e6ac4b1b68c8c3bbe0848603b25c086b63 |
Provenance
The following attestation bundles were made for django_allauth_2fa-0.12.0.tar.gz
:
Publisher:
ci.yml
on valohai/django-allauth-2fa
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
django_allauth_2fa-0.12.0.tar.gz
- Subject digest:
4b0c4cfea9c30be7c0971421b9b1f4961a19a69af72b7b5c0c7a3dbbc2537253
- Sigstore transparency entry: 162835025
- Sigstore integration time:
- Permalink:
valohai/django-allauth-2fa@99737c015b56a92c972e883dd329f301db604eb2
- Branch / Tag:
refs/tags/v0.12.0
- Owner: https://github.com/valohai
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
ci.yml@99737c015b56a92c972e883dd329f301db604eb2
- Trigger Event:
push
- Statement type:
File details
Details for the file django_allauth_2fa-0.12.0-py3-none-any.whl
.
File metadata
- Download URL: django_allauth_2fa-0.12.0-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba53f47fd777d13c48842a7b779ab5ad24ad8c50f05aba98c64810263a50382d |
|
MD5 | d01e3ac9b7396ca55bd7136ce98d8cac |
|
BLAKE2b-256 | bf875032c23d25d4ea4dcc89eaf388e831c0c1f27c38a25997e0b5739f9b3a6c |
Provenance
The following attestation bundles were made for django_allauth_2fa-0.12.0-py3-none-any.whl
:
Publisher:
ci.yml
on valohai/django-allauth-2fa
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
django_allauth_2fa-0.12.0-py3-none-any.whl
- Subject digest:
ba53f47fd777d13c48842a7b779ab5ad24ad8c50f05aba98c64810263a50382d
- Sigstore transparency entry: 162835026
- Sigstore integration time:
- Permalink:
valohai/django-allauth-2fa@99737c015b56a92c972e883dd329f301db604eb2
- Branch / Tag:
refs/tags/v0.12.0
- Owner: https://github.com/valohai
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
ci.yml@99737c015b56a92c972e883dd329f301db604eb2
- Trigger Event:
push
- Statement type: