Skip to main content

Auth0Backend For Django

Source

USE AT YOUR OWN RISK. API WILL LIKELY KEEP CHANGING FOR NOW.

Experimental application to manage code and jwt auth from Auth0 with Django.

If you’re using the JWT mechanism, you’ll need to include the openid email scopes to get the email_verified claim.

This app provides a custom user model which is required for use with the app (see step 2 of setup).

Setup

  1. Add to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'ECAuth0Backend',
    ]
  2. Set django to use the ECAuth0Backend user model:

    AUTH_USER_MODEL = 'ECAuth0Backend.A0User'
  3. Include the URLconf in your project urls.py like this:

    import ECAuth0Backend.urls
    
    urlpatterns = [
        # your urls
    ] + ECAuth0Backend.urls.urlpatterns
  4. Run python manage.py migrate to create the user model.

  5. Add the required configuration to your settings.py (you can look through ECAuth0Backend.settings.py for more settings):

    AUTH0_DOMAIN = '' # Your auth0 domain
    
    AUTH0_CODE_CLIENT_ID = '' # Your auth0 client ID for code auth
    AUTH0_CODE_CLIENT_SECRET = '' # Your auth0 client secret for code auth
    AUTH0_CODE_CALLBACK_PATH = '' # Callback url you want auth0 to send the client back to (url pattern defined below)
    
    AUTH0_JWT_SECRET = '' # auth0 client secret for jwt client
    AUTH0_JWT_CLIENT_ID = '' # auth0 client id for jwt client
  6. Add the authentication backend:

    AUTHENTICATION_BACKENDS = [
        'ECAuth0Backend.backend.Auth0Backend',
        'django.contrib.auth.backends.ModelBackend',
    ]
  7. For JWT with DRF use ECAuth0Backend.jwt.Auth0JWTAuthentication as an authentication class

Metadata

Release files for ECAuth0Backend 0.2.2

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

Source distribution (sdist)

Source distribution for ECAuth0Backend 0.2.2
File Size Uploaded Provenance Actions
ECAuth0Backend-0.2.2.tar.gz 9.1 kB Without provenance Details for ECAuth0Backend-0.2.2.tar.gz

Release files / ECAuth0Backend-0.2.2.tar.gz

Download URL ECAuth0Backend-0.2.2.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f71ae11ce55c49a237ab243e5283d563ac190f1c58ed076340bdb59935c6e8a9
BLAKE2b-256 checksum
How to use checksums
1c78791345bc6f3f13e8ff95fbb39e55afc156de1b543b670651988edf50ff1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for ECAuth0Backend 0.2.2

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