Skip to main content
https://codecov.io/gh/CyberDeck/django-allauth-webauthn/branch/master/graph/badge.svg?token=SANFSR1SYD

Welcome to django-allauth-webauthn!

django-allauth-webauthn adds two-factor authentication by using the webauthn standard to django-allauth. django-allauth is a set of Django applications which help with authentication, registration, and other account management tasks.

Using the webauthn standard for the second authentication factor allows for a variety of authentication schemes on the client side. The user may authenticate by using a roaming hardware token (e.g. a USB key or Bluetooth Low Energy device) or the operating system may provide the authentication functionality (e.g. Windows Hello).

django-allauth-webauthn does not implement the webauthn standard to allow for password-less logins. It allows to authenticate a user after the usual login scheme against a pre-registered security token. The user may pre-register an arbitrary amount of tokens.

Source code

http://github.com/cyberdeck/django-allauth-webauthn

Documentation

https://django-allauth-webauthn.readthedocs.io/

Main Feature

Adds webauthn-based two-factor authentication views and workflow to django-allauth.

Compatibility

django-allauth-webauthn was actively developed against django-allauth 0.45 using Django 3.2 and Python 3.8.

However, it includes exceptional testing aiming for 100% coverage and thus, you may test it easily against your version requirements. If you need to patch it due to compatibility reasons I would love to see you contributing a pull request.

Where does it come from?

django-allauth-webauthn was created from scratch but it borrows a lot of ingredients from django-allauth-2fa and django-webauthin. Both packages are exceptionally useful but does not included the feature to allow for a webauthn-based two-factor authentication out of the box.

Contributing

django-allauth-webauthn was initially developed by H. Gregor Molter due to the lack of other suitable webauthn-based two-factor authentication packages. Please feel free to contribute if you find django-allauth-webauthn useful!

  1. Check for open issues or open a new issue to start a discussion around a bug or your special feature request.

  2. For the repository on GitHub and start to develop on the master branch or a custom branch derived from the master branch.

  3. Write one or multiple test(s) to allow for validation that the bug was fixed or that your special feature works as expected without any negative impact on the behavior of the other functionality.

  4. Before submitting your patch please thoroughly check your contribution by executing the pre-commit script.

  5. Send a pull request to get your changes merged and published.

Developing

django-allauth-webauthn make heavy use of the poetry Python packaging and dependency manager and the pre-commit framework.

After you forked (and branched) django-allauth-webauthn please install all development dependencies with poetry:

$ poetry install

poetry will install all needed development dependencies in a virtual environment for you. Afterwards install the pre-commit hooks by running:

$ poetry run pre-commit install

The pre-commit hooks will be executed automatically prior committing to the Git repository. There are hooks for source code styling (e.g. import reordering) and it is ensured that all tests may be executed successfully and that no obvious type checking issues are included.

To execute these hooks manually (i.e. without performing a commit) execute the following:

$ poetry run pre-commit run --all-files

Testing

Tests can be run using the standard Django testing facility by executing:

$ poetry run python manage.py test

Coverage

During test execution a coverage report can be created with:

$ poetry run coverage run manage.py test

To view the coverage report on the command line you have to execute:

$ poetry run coverage report -m

or you can generate an HTML report for more eye candy:

$ poetry run coverage html

The resulting HTML report will be stored in the coverage_html folder.

Demo Project

A simple demo Django project is included within the demo folder and may be run by:

$ cd demo
# Migrate the demo database first (only needed once)
$ poetry run python manage.py migrate
# Run the SSL demo server (a self-signed certificate and private key is created during first run)
$ poetry run python manage.py runserver_plus --cert test.crt

The demo app allows you to register security tokens to a logged in user. If a user has at least a single security token registered, she will be asked to authenticate with this token during sign in. Security tokens may be renamed or deleted. All in one, it demonstrates the basic workflow for webauthn-based two-factor authentication.

Metadata

Release files for django-allauth-webauthn 0.2.3

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-webauthn 0.2.3
File Size Uploaded Provenance Actions
django_allauth_webauthn-0.2.3.tar.gz 15.4 kB Without provenance Details for django_allauth_webauthn-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-allauth-webauthn 0.2.3
File Interpreter ABI Platform Actions
django_allauth_webauthn-0.2.3-py3-none-any.whl Python 3 none any Details for django_allauth_webauthn-0.2.3-py3-none-any.whl

Total release size: 34.1 kB

Release files / django_allauth_webauthn-0.2.3.tar.gz

Download URL django_allauth_webauthn-0.2.3.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
66b61fe117ccc60a83a1375cbe6bfa47cff5c8e9b8aed42eacb50e20ea2d2d3e
BLAKE2b-256 checksum
How to use checksums
cf26d1302bfd1f8036b1bcd42bbadc7ec3a6a3633ddae9166220699b6932e02d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1018-azure

Release files / django_allauth_webauthn-0.2.3-py3-none-any.whl

Download URL django_allauth_webauthn-0.2.3-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fae55edc89ff6b32a385f7400a6d8df49e7cecb416e722bd2f1be4c073d49cf
BLAKE2b-256 checksum
How to use checksums
600d9ea706547cd1b56eea8e3744d1ce12b895e03c4939f3a68b4f68c2b0649d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1018-azure

Security for django-allauth-webauthn 0.2.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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