Django app to implement two factor authentication with bootstrap modals
Project description
Adds to Django's authentication with 2FA option
- 2FA with Authenticator app using TOTP
- Use WebAuthn with Windows Hello, Face ID, Yubikey etc
- Lock out by ip and username for too many failed attempts
- Customisable Bootstrap 4 Modal interface with django-nested-modals
- Cookie option to bypass 2FA (changing key to prevent copying of cookies)
- Invite users by email to setup an account
- Forgotten password function to email reset link
Installation
settings
from modal_2fa.settings_helper import modal_2fa_apps_admin
INSTALLED_APPS += [
*modal_2fa_apps_admin,
]
OTP_TOTP_ISSUER = '**appname**'
AUTHENTICATION_BACKENDS = ['modal_2fa.auth.CookieBackend']
LOGIN_URL ='/auth/login/'
LOGOUT_REDIRECT_URL = '/auth/login'
remove
'django.contrib.auth'
from INSTALLED_APPS
urls
from modal_2fa.utils import get_custom_auth
urlpatterns += [
path('', include(get_custom_auth().paths(include_admin=True))),
]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-modal-2fa-0.0.5.tar.gz
(20.4 kB
view details)
Built Distribution
File details
Details for the file django-modal-2fa-0.0.5.tar.gz
.
File metadata
- Download URL: django-modal-2fa-0.0.5.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd855208cd72681c94bce0cc17266d9d836d80014d92a9eeda0b0a8e9166223a |
|
MD5 | 18bd1b2d72844f72006b3a19f3f35ade |
|
BLAKE2b-256 | 3a4993811c1b0f0ed6f756f3c0e2820c5210d9320f7b059de5b34aea34752f27 |
File details
Details for the file django_modal_2fa-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: django_modal_2fa-0.0.5-py3-none-any.whl
- Upload date:
- Size: 29.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a396088d6da0636d13c06ad3d5e6c9f9c694d75de6f58c4bb27ccd06bea8f118 |
|
MD5 | 348cbf7573a50c5c47e965970e818646 |
|
BLAKE2b-256 | 48bb5408780e4e65b347019c932f48e4c072eb8e1c0c8c1f972551b356db7d14 |