Skip to main content

Django Auth0 Auth

Django Auth0 Auth allows you to authenticate through Auth0 in Django 2

Installation

Run pip install django2-auth0-auth

Add the Auth0Backend to your AUTHENTICATION_BACKENDS setting:

AUTHENTICATION_BACKENDS = (
    ...
    'auth0_auth.backends.Auth0Backend',
)

Add the Auth0Middleware to your MIDDLEWARE setting:

MIDDLEWARE = [
    ...
    'auth0_auth.middleware.Auth0Middleware'
]

Edit your urls.py to include:

from django.views.generic import RedirectView
urlpatterns = [
    ...
    #Add this BEFORE you include the admin urls, so admin login will redirect to auth0 login
    path('admin/login/', RedirectView.as_view(pattern_name='auth0_login', permanent=False, query_string=True)),
    #Add the auth0 urls
    path('auth0/', include('auth0_auth.urls')),
    ...
]

Settings

AUTH0_DOMAIN

Auth0 domain.

AUTH0_CLIENT_ID

Auth0 client id.

AUTH0_CLIENT_SECRET

Auth0 client secret.

AUTH0_SECRET_BASE64_ENCODED

default: False Flag if Auth0 client secret is base64 encoded.

AUTH0_SCOPE

default: 'openid email' OAuth scope parameter.

AUTH0_RESPONSE_TYPE

default: 'code' OAuth response type parameter.

AUTH0_USER_CREATION

default: True Allow creation of new users after successful authentication.

Logging

To enable logging add auth0_auth to LOGGING['loggers'] options.

LOGGING = {
    ...,
    'loggers': {
        ...,
        'auth0_auth': {
            'handlers': ['console'],
            'level': 'DEBUG',
        }
    }
}

Metadata

Release files for django2-auth0-auth 4.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django2-auth0-auth 4.1.5
File Size Uploaded Provenance Actions
django2-auth0-auth-4.1.5.tar.gz 7.1 kB Without provenance Details for django2-auth0-auth-4.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django2-auth0-auth 4.1.5
File Interpreter ABI Platform Actions
django2_auth0_auth-4.1.5-py3-none-any.whl Python 3 none any Details for django2_auth0_auth-4.1.5-py3-none-any.whl

Total release size: 15.5 kB

Release files / django2-auth0-auth-4.1.5.tar.gz

Download URL django2-auth0-auth-4.1.5.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b691a222fae14e992bb2031de0132fca0481113a8a6d2a59d75f04beda78ad97
BLAKE2b-256 checksum
How to use checksums
1e065290a5ae823fbc123624667835f0042e224d6dcffccce60941ad910ca47b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6

Release files / django2_auth0_auth-4.1.5-py3-none-any.whl

Download URL django2_auth0_auth-4.1.5-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6de801454c830bd1359ce4e7c10cf69949ffecd7413f35c6d2895215e3035bb
BLAKE2b-256 checksum
How to use checksums
837f1172d4813b6a08d4108e15ceaa29b93533b71cdd2b689bdb4f6bdbfc8ffc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6

Security for django2-auth0-auth 4.1.5

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page