mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-13 17:19:10 +02:00
* Add issuer_url parameter to OAuth providers for mounting scenarios * Add get_well_known_routes * Update docs * Improve docs and tests * Trigger CI * Fix conditional test execution for Windows
47 lines
1.4 KiB
Text
47 lines
1.4 KiB
Text
---
|
|
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 Auth0Provider
|
|
|
|
# Simple Auth0 OAuth protection
|
|
auth = Auth0Provider(
|
|
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
|
|
|
|
### `Auth0ProviderSettings` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/providers/auth0.py#L37" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
|
|
|
|
|
|
Settings for Auth0 OIDC provider.
|
|
|
|
|
|
### `Auth0Provider` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/providers/auth0.py#L62" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
|
|
|
|
|
|
An Auth0 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.
|
|
|