---
title: auth0
sidebarTitle: auth0
---
# `fastmcp.server.auth.providers.auth0`
Auth0 OAuth provider for FastMCP.
This module provides a complete Auth0 integration that's ready to use with
just the configuration URL, client ID, client secret, audience, and base URL.
Example:
```python
from fastmcp import FastMCP
from fastmcp.server.auth.providers.auth0 import Auth0DCRProvider
# Simple Auth0 OAuth protection
auth = Auth0DCRProvider(
config_url="https://auth0.config.url",
client_id="your-auth0-client-id",
client_secret="your-auth0-client-secret",
audience="your-auth0-api-audience",
base_url="http://localhost:8000",
)
mcp = FastMCP("My Protected Server", auth=auth)
```
## Classes
### `Auth0DCRProviderSettings`
Settings for Auth0 OIDC DCR provider.
**Methods:**
#### `settings_customise_sources`
```python
settings_customise_sources(cls, settings_cls, init_settings, env_settings, dotenv_settings, file_secret_settings)
```
### `Auth0DCRProvider`
An Auth0 DCR provider implementation for FastMCP.
This provider is a complete Auth0 integration that's ready to use with
just the configuration URL, client ID, client secret, audience, and base URL.
### `Auth0Provider`
Deprecated: Use Auth0DCRProvider instead.
This alias is provided for backwards compatibility and will be removed in a future version.