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.4.tar.gz
(20.3 kB
view details)
Built Distribution
File details
Details for the file django-modal-2fa-0.0.4.tar.gz
.
File metadata
- Download URL: django-modal-2fa-0.0.4.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0606e9ccc632ef62852596a603ecaddac4bfba8810c4b0ff1b41ba8f782650a |
|
MD5 | 73af2dd09bc3af6f07973ba65c839714 |
|
BLAKE2b-256 | 8b065088168cb735b568ecea9e8105cf4773821671e962a3839c96d0e8e9c795 |
File details
Details for the file django_modal_2fa-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: django_modal_2fa-0.0.4-py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4ff3b1eb64466c25a74d1d9731ab3adfb7b48b381ecdfe94451fb8227e2ec53 |
|
MD5 | c30a1eac9b12250399ac154925b03872 |
|
BLAKE2b-256 | b8b534d86d3da99e1a8228e9eb565a088d4d827352d6b5d0913f794e7138f37e |