Note that this is very much not a finished package. Consider it a tech demo, or a small proof of concept, and feel free to use it however you'd like, but I would not recommend using it in production as-is.
Installation
pip install django-passkey-auth- Add
passkeysto yourINSTALLED_APPSsetting - Include
passkeys.urlssomewhere in yoururls.py(auth/passkey/for example) - Migrate your database
Integration with the Django admin
django-passkey-auth comes with some basic admin template overrides that make it possible to register and authenticate with a passkey to the Django admin. To use these customizations, add passkeys.template_directory to your TEMPLATES["DIRS"] list.
The next time you log into the admin, a "Register Passkey" link will be available in the user links at the top. Once you have registered a passkey, you can use the "Passkey Login" button available on the admin login form.
Integration with your site
- Add
<script src="{% static 'passkeys/passkeys.js' %}"></script>to your login page, and any page where you may want to allow users to register or use a passkey. - Instead of passing
endpointandredirectto each method (which you can do via an options object, or usingdata-attributes of elements), you can initialize thePasskeysobject with a default endpoint and redirect lcoation as follows:Passkeys.init({ endpoint: "{% url 'passkey-info' %}", redirect: "{% url 'home' %}", });
- Add a button to allow authenticated users to register a passkey:
<button onclick="Passkeys.register()">Register Passkey</button>
- Add a button to your login page to allow users to authenticate with a passkey:
<button data-redirect="{{ redir }}" onclick="Passkeys.authenticate()">Passkey Login</button>
- Add an autocomplete to your username field and call
autofill:<input type="text" name="username" autocomplete="username webauthn" autofocus /> <script> Passkeys.autofill({ redirect: '{{ redir }}', }); </script>
Metadata
Release files for django-passkey-auth 0.2.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 | Actions |
|---|---|---|---|---|
| django_passkey_auth-0.2.0.tar.gz | 7.3 kB | Without provenance | Details for django_passkey_auth-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_passkey_auth-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for django_passkey_auth-0.2.0-py3-none-any.whl |
Total release size: 19.8 kB
Release files / django_passkey_auth-0.2.0.tar.gz
| Download URL | django_passkey_auth-0.2.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
878e2bd4be8355eaca384eea71f8f26d6d99a1a4d0212deaf9fa4562481e07a8
|
|
BLAKE2b-256 checksum How to use checksums |
b6a7fe5a09646cdcf4a244f61554bfeab9f15210737bdd91276b22d24eb5a037
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.4
|
Release files / django_passkey_auth-0.2.0-py3-none-any.whl
| Download URL | django_passkey_auth-0.2.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3dc923a685dffb6a48ee416a54c2f851fbc05d27e4e8e00e54023d44afb0f33c
|
|
BLAKE2b-256 checksum How to use checksums |
67a66ab64dfd27c4fabc28a9fdade4b24414cb6d170e1a1deb5c29b52cb99597
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.4
|
Security for django-passkey-auth 0.2.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.
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.