This Django app add’s two factor authentication to Wagtail. Behind the scenes it use django-otp which supports Time-based One-Time Passwords (TOTP). This allows you to use various apps like Authy, Google Authenticator, or 1Password.
Installation
pip install wagtail-2fa
Then add the following lines to the INSTALLED_APPS list in your Django settings:
INSTALLED_APPS = [
# ...
'wagtail_2fa',
'django_otp',
'django_otp.plugins.otp_totp',
# ...
]
Next add the required middleware to the MIDDLEWARE. It should come after the AuthenticationMiddleware:
MIDDLEWARE = [
# .. other middleware
# 'django.contrib.auth.middleware.AuthenticationMiddleware',
'wagtail_2fa.middleware.VerifyUserMiddleware',
# 'wagtail.core.middleware.SiteMiddleware',
# .. other middleware
]
Settings
The following settings are available (Set via your Django settings):
WAGTAIL_2FA_REQUIRED (default False): When set to True all staff, superuser and other users with access to the Wagtail Admin site are forced to login using two factor authentication.
Sandbox
First create a new virtualenv with Python 3.6.1 and activate it. Then run the following commands:
make sandbox
You can then visit http://localhost:8000/admin/ and login with the following credentials:
E-mail: superuser@example.com
Password: testing
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wagtail-2fa-1.0.0.tar.gz.
File metadata
- Download URL: wagtail-2fa-1.0.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c6b367bc3c6904e9cf03948f40087948ad998083e876e9c56dd1703ad2c984f
|
|
| MD5 |
61b0d2849fa8f69d1e1a4e31f876e6c9
|
|
| BLAKE2b-256 |
f7b572267bab8fc95ed8b1317f28eb6c6a3f06c3688677e3ebf922c83b86b74b
|
File details
Details for the file wagtail_2fa-1.0.0-py3-none-any.whl.
File metadata
- Download URL: wagtail_2fa-1.0.0-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a5c4c1a633419488fccba5f23da004c79aa293af824d1062ff79fcc3649cbe9
|
|
| MD5 |
24e91af11b39e91d9693466e41aac60e
|
|
| BLAKE2b-256 |
877929e90d15255dcabb36b2271b4f7b7ce2fcf76d618640ee62e034433b40f4
|