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.

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.2.0.tar.gz (15.4 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.2.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: auth0_oauth_client-0.2.0.tar.gz
  • Upload date:
  • Size: 15.4 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.2.0.tar.gz
Algorithm Hash digest
SHA256 5482e133aaeba274151efc4ff53ad6211272958da718b710212cb8cea8fb14ab
MD5 9f702d027015d56b5a71995155093d96
BLAKE2b-256 d080f8597719c4a2bd80ef665842bb82d7b9713e22d4a900f2f5d4054fd2301f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: auth0_oauth_client-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.1 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 364043be2f17bf9fadcbbdef726cc52702c871b7b0efb5ebbe8987742d14f66b
MD5 d3fbeff024b095e4087f529833f06f7b
BLAKE2b-256 5e3605628dcfe74b618cad96548d40a85c234cd5ce10b9bed4c3ace6416a3fa6

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