Django Admin Two-Factor Authentication
Django Admin Two-Factor Authentication, allows you to login django admin with google authenticator.
Why Django Admin Two-Factor Authentication?
- Using google authenticator to login your Django admin.
- Used jquery confirm dialog to get code.
- Simple interface
- Easy integration
How to use it
- Download and install last version of Django Admin Two-Factor Authentication:
$ pip install django-admin-two-factor
# or
$ easy_install django-admin-two-factor
- Add 'admin_two_factor' application to the INSTALLED_APPS setting of your Django project
settings.pyfile (note it should be before 'django.contrib.admin'):
INSTALLED_APPS = (
'admin_two_factor.apps.TwoStepVerificationConfig',
'django.contrib.admin',
# ...
)
- Migrate
admin_two_factor:
$ python manage.py migrate admin_two_factor
$ # or
$ python manage.py syncdb
- Add
ADMIN_TWO_FACTOR_NAMEin yoursettings.py. This value will be displayed in Google Authenticator.
ADMIN_TWO_FACTOR_NAME = 'PROJECT_NAME'
- Include the Admin Two Factor URL config in
PROJECT_CORE/urls.py:
urlpatterns = [
path('admin/', admin.site.urls),
path('two_factor/', include(('admin_two_factor.urls', 'admin_two_factor'), namespace='two_factor')),
# ...
]
- Collect static if you are in production environment:
$ python manage.py collectstatic
- Clear your browser cache
Start the app
$ # Set up the database
$ python manage.py makemigrations
$ python manage.py migrate
$
$ # Create the superuser
$ python manage.py createsuperuser
$
$ # Start the application (development mode)
$ python manage.py runserver # default port 8000
- Access the
adminsection in the browser:http://127.0.0.1:8000/
ScreenShoots
- User List: the users who have enabled two-factor auth
- Add New User:
- Scan QRCode and enter the valid code:
- Logout and login again with Google Authenticator:
Metadata
Release files for django-admin-two-factor 0.1.1
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-admin-two-factor-0.1.1.tar.gz | 60.3 kB | Without provenance | Details for django-admin-two-factor-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_admin_two_factor-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for django_admin_two_factor-0.1.1-py3-none-any.whl |
Total release size: 127.6 kB
Release files / django-admin-two-factor-0.1.1.tar.gz
| Download URL | django-admin-two-factor-0.1.1.tar.gz |
|---|---|
| Size | 60.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
994967635f6c74bdb7100c5f9cbed76552e0473e41a0cc086d79866584b465d8
|
|
BLAKE2b-256 checksum How to use checksums |
8a4abbcfc56795640a2a4cf5c6fb3fff2e89ca2934b5a72c0416de3bdac88075
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.7.1 requests/2.22.0 setuptools/58.2.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Release files / django_admin_two_factor-0.1.1-py3-none-any.whl
| Download URL | django_admin_two_factor-0.1.1-py3-none-any.whl |
|---|---|
| Size | 67.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
647405cf436544ba007292f920dc3bf355c6caf607050c067da68d5bd4b3f2f5
|
|
BLAKE2b-256 checksum How to use checksums |
9153ef14e0fb843beea75cb52df56d7d1e6f7dbc9d9d4c8e1e5c6fe20c61b44e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.7.1 requests/2.22.0 setuptools/58.2.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Security for django-admin-two-factor 0.1.1
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.