Skip to main content

A Django-focused Auth0 integration providing automated OIDC flows, account linking, and so on.

Project description

Auth0 OAuth Client

A Django-focused Auth0 integration providing automated OIDC flows, account linking, and connected account (My Account API). It's been created to support the Auth0 Token Vault feature, which requires Connected Accounts flow.

It's an opinionated library focused on the needs of our own products. Feel free to fork it and adapt it to your needs.

Read this before using it

This library uses uuid7 for the ID columns when the Python version is 3.14 or higher. If you're using Python 3.12 or 3.13, it will use uuid4 instead. If your project updates to Python 3.14, it will break. We know this behavior is unacceptable for a library. That's why we are letting you know in advance. Again, fork this library and adapt it to your needs.

Rules

The sample_app demonstrates how to use the library. It implements the following rules:

  • Only required scopes are requested for social connections.
  • Additional scopes are requested during the connected account request flow (progressive consent).
  • When the user creates a connected account, that connected account is eligible for automatic account linking.
    • Consider the following scenario:
      • If a user logs in with xpto@acme.com and adds qwerty@gmail.com as a connected account, logging in later with the Gmail address will link both, with xpto@acme.com remaining the primary account. No confirmation is required.
      • The same is true when the connected account matches the primary account.
  • If a user signs up with an email/password, logs out, and later logs back in using a social connection with that same email, the accounts are automatically linked. The original email/password account is used as the primary account.
  • If a user signs up via social, logs out, and later tries to log in with a password using the same email, they'll need to re-authenticate with the original social provider to link the accounts. The primary account is the social one.

Why did we build this?

Auth0 used to be the 'Stripe of Identity' sort of thing, known for its great developer experience. Lately, I’m not so sure. I almost gave up on it, but after finding some workarounds, I decided to build this library. I’m sharing it because seeing these issues go unaddressed hurts my software developer soul. 😬

Read the following Auth0 Community Questions for more details:

At the time of writing this README (2026-02-13), My Account API is not GA yet. It means this library might eventually break if Auth0 changes its API, again. 😐

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

auth0_oauth_client-0.3.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auth0_oauth_client-0.3.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file auth0_oauth_client-0.3.0.tar.gz.

File metadata

  • Download URL: auth0_oauth_client-0.3.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.14.3 Linux/6.14.0-1017-azure

File hashes

Hashes for auth0_oauth_client-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2ce4d31417fc3177a0c18772702c04c58b1c6c4cafca483d1ed99c8d440ebe43
MD5 a5ac7f7702fd4b6cc39ba115f10b3a88
BLAKE2b-256 b048bfda4770c0c5649e278f4f980478886ffa9ff8b615c2e067e099ab36bce9

See more details on using hashes here.

File details

Details for the file auth0_oauth_client-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: auth0_oauth_client-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.14.3 Linux/6.14.0-1017-azure

File hashes

Hashes for auth0_oauth_client-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 17fbf8d73729b804bfac63b78ec2891e4a2a7d79507cc67af0643f73b83cac9d
MD5 6e76ca523f457283bf4f499923ab3248
BLAKE2b-256 ef462175cc57ea9132a1b1d293e3adfee1a304ab78d135600729456e93ec8367

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page