Skip to main content

Auth0 JWT Validator

A JWT python package to validate tokens, scopes and permissions for Auth0 tokens.

Installation

Install with uv

uv add auth0-jwt-validator

Install with pip

pip install auth0-jwt-validator

Requirements

  • Python 3.10 or later

Usage

Validating an ID Token

from auth0_jwt_validator import IdTokenVerifier

auth0_jwks_uri = "https://<auth0-tenant>.us.auth0.com/.well-known/jwks.json"
issuer = "https://<auth0-tenant>.us.auth0.com/"
audience = "https://<auth0-tenant>.us.auth0.com/api/v2/"

token_verifier = IdTokenVerifier(auth0_jwks_uri, issuer, audience)
token_verifier.verify("some-id-token")

The verify method also accepts nonce, max_age and organization to validate the matching claims:

token_verifier.verify("some-id-token", nonce="some-random-string")
token_verifier.verify("some-id-token", max_age=60 * 60 * 24)
token_verifier.verify("some-id-token", organization="some-organization")

Validating an Access Token

from auth0_jwt_validator import AccessTokenVerifier

auth0_jwks_uri = "https://<auth0-tenant>.us.auth0.com/.well-known/jwks.json"
issuer = "https://<auth0-tenant>.us.auth0.com/"
audience = "https://<auth0-tenant>.us.auth0.com/api/v2/"

token_verifier = AccessTokenVerifier(auth0_jwks_uri, issuer, audience)
token_verifier.verify("some-access-token")

The verify method also accepts organization, required_scopes and required_permissions:

token_verifier.verify("some-access-token", organization="some-organization")
token_verifier.verify("some-access-token", required_scopes=["profile", "calendar"])
token_verifier.verify("some-access-token", required_permissions=["read:user", "delete:user"])

Extracting a bearer token from a header

from auth0_jwt_validator import get_token

get_token("Bearer super-secret-token")  # "super-secret-token"

Both verifiers raise authlib.jose.errors.MissingClaimError or authlib.jose.errors.InvalidClaimError (re-exported from this package) when a claim is missing or does not match the expected value.

Development

This project uses uv to manage dependencies and packaging.

uv sync --extra dev

Common tasks are wired up through nox:

uvx nox -s lint
uvx nox -s test
uvx nox -s type_check
uvx nox -s security_test

License

MIT — see LICENSE.

Metadata

Release files for auth0-jwt-validator 1.2.1

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

Source distribution (sdist)

Source distribution for auth0-jwt-validator 1.2.1
File Size Uploaded
auth0_jwt_validator-1.2.1.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for auth0-jwt-validator 1.2.1
File Interpreter ABI Platform
auth0_jwt_validator-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.9 kB

Release files / auth0_jwt_validator-1.2.1.tar.gz

Download URL auth0_jwt_validator-1.2.1.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
400b43778362299c43096645f5200092ed004965eec7588b5c1ae0692ae24c3c
BLAKE2b-256 checksum
How to use checksums
f09b39025c3d03ead9ca86ee366990b503f14cba02ea8ae98c34f24ce38ccf1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / auth0_jwt_validator-1.2.1-py3-none-any.whl

Download URL auth0_jwt_validator-1.2.1-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6741fac356731df50b46f9b9706a67675177cb5a0adc6ad3754612fa23feaf2b
BLAKE2b-256 checksum
How to use checksums
066d70407d016c6ba24a5b689b6458f70357047da8e46564c3b01443fcc53ca5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

0.1

2 release files

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