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.3.tar.gz
(20.2 kB
view details)
Built Distribution
File details
Details for the file django-modal-2fa-0.0.3.tar.gz
.
File metadata
- Download URL: django-modal-2fa-0.0.3.tar.gz
- Upload date:
- Size: 20.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de01b064b20be94d7bf1ac34491b3665c93afa03cf7a3f0b983472270d267c6e |
|
MD5 | d761ff17f0807458f81d5335c06325b1 |
|
BLAKE2b-256 | e01731e8bac9862d7869c25571093b113d2bb4ada12f4f7885c8a69fc86dfd5d |
File details
Details for the file django_modal_2fa-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: django_modal_2fa-0.0.3-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 | 7eccd1c3b6d4efeea005535c0a2894128f5a1d0aeebb8a704570d97affbe48ed |
|
MD5 | 56de24f8f0cbbe2bc335d66123c0e4f6 |
|
BLAKE2b-256 | b53818b282a66feedb1d373042a8e6916199f429952786f51f83b112b44243fe |