Update AuthKit vocab (#1338)

This commit is contained in:
Jeremiah Lowin 2025-08-01 17:56:15 -07:00 committed by GitHub
commit 5a87a4787d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 35 deletions

View file

@ -65,10 +65,7 @@
{
"group": "Essentials",
"icon": "cube",
"pages": [
"servers/server",
"deployment/running-server"
]
"pages": ["servers/server", "deployment/running-server"]
},
{
"group": "Core Components",
@ -111,10 +108,7 @@
{
"group": "Essentials",
"icon": "cube",
"pages": [
"clients/client",
"clients/transports"
]
"pages": ["clients/client", "clients/transports"]
},
{
"group": "Core Operations",
@ -140,10 +134,7 @@
{
"group": "Authentication",
"icon": "user-shield",
"pages": [
"clients/auth/oauth",
"clients/auth/bearer"
]
"pages": ["clients/auth/oauth", "clients/auth/bearer"]
}
]
},
@ -151,6 +142,7 @@
"group": "Integrations",
"pages": [
"integrations/anthropic",
"integrations/authkit",
"integrations/chatgpt",
"integrations/claude-code",
"integrations/claude-desktop",
@ -162,8 +154,7 @@
"integrations/openai",
"integrations/openapi",
"integrations/permit",
"integrations/starlette",
"integrations/authkit"
"integrations/starlette"
]
},
{
@ -190,17 +181,12 @@
},
{
"anchor": "What's New",
"pages": [
"updates",
"changelog"
]
"pages": ["updates", "changelog"]
},
{
"anchor": "Community",
"icon": "users",
"pages": [
"community/showcase"
]
"pages": ["community/showcase"]
}
]
},

View file

@ -1,7 +1,7 @@
---
title: WorkOS AuthKit 🤝 FastMCP
sidebarTitle: WorkOS AuthKit
description: Secure your FastMCP server with WorkOS AuthKit
title: AuthKit 🤝 FastMCP
sidebarTitle: AuthKit
description: Secure your FastMCP server with AuthKit by WorkOS
icon: shield-check
tag: NEW
---
@ -10,20 +10,20 @@ import { VersionBadge } from "/snippets/version-badge.mdx"
<VersionBadge version="2.11.0" />
This guide shows you how to secure your FastMCP server using **WorkOS AuthKit**, a complete authentication and user management solution. This integration uses the [**Remote OAuth**](/servers/auth/remote-oauth) pattern, where WorkOS handles user login and your FastMCP server validates the tokens.
This guide shows you how to secure your FastMCP server using WorkOS's **AuthKit**, a complete authentication and user management solution. This integration uses the [**Remote OAuth**](/servers/auth/remote-oauth) pattern, where AuthKit handles user login and your FastMCP server validates the tokens.
## Configuration
### Prerequisites
Before you begin, you will need:
1. A **WorkOS Account** and a new **Project**.
2. An **AuthKit** instance configured within your WorkOS project.
1. A **[WorkOS Account](https://workos.com/)** and a new **Project**.
2. An **[AuthKit](https://www.authkit.com/)** instance configured within your WorkOS project.
3. Your FastMCP server's URL (can be localhost for development, e.g., `http://localhost:8000`).
### Step 1: AuthKit Configuration
In your WorkOS Dashboard, navigate to your AuthKit instance and configure the following settings:
In your WorkOS Dashboard, enable AuthKit and configure the following settings:
<Steps>
<Step title="Enable Dynamic Client Registration">

View file

@ -32,9 +32,9 @@ class AuthKitProviderSettings(BaseSettings):
@register_provider("AUTHKIT")
class AuthKitProvider(AuthProvider):
"""WorkOS AuthKit metadata provider for DCR (Dynamic Client Registration).
"""AuthKit metadata provider for DCR (Dynamic Client Registration).
This provider implements WorkOS AuthKit integration using metadata forwarding
This provider implements AuthKit integration using metadata forwarding
instead of OAuth proxying. This is the recommended approach for WorkOS DCR
as it allows WorkOS to handle the OAuth flow directly while FastMCP acts
as a resource server.
@ -56,7 +56,7 @@ class AuthKitProvider(AuthProvider):
```python
from fastmcp.server.auth.providers.workos import AuthKitProvider
# Create WorkOS metadata provider (JWT verifier created automatically)
# Create AuthKit metadata provider (JWT verifier created automatically)
workos_auth = AuthKitProvider(
authkit_domain="https://your-workos-domain.authkit.app",
base_url="https://your-fastmcp-server.com",
@ -75,13 +75,13 @@ class AuthKitProvider(AuthProvider):
required_scopes: list[str] | None | NotSetT = NotSet,
token_verifier: TokenVerifier | None = None,
):
"""Initialize WorkOS metadata provider.
"""Initialize AuthKit metadata provider.
Args:
authkit_domain: Your WorkOS AuthKit domain (e.g., "https://your-app.authkit.app")
authkit_domain: Your AuthKit domain (e.g., "https://your-app.authkit.app")
base_url: Public URL of this FastMCP server
required_scopes: Optional list of scopes to require for all requests
token_verifier: Optional token verifier. If None, creates JWT verifier for WorkOS
token_verifier: Optional token verifier. If None, creates JWT verifier for AuthKit
"""
super().__init__()
@ -112,7 +112,7 @@ class AuthKitProvider(AuthProvider):
self.token_verifier = token_verifier
async def verify_token(self, token: str) -> AccessToken | None:
"""Verify a WorkOS token using the configured token verifier."""
"""Verify an AuthKit token using the configured token verifier."""
return await self.token_verifier.verify_token(token)
def customize_auth_routes(self, routes: list[BaseRoute]) -> list[BaseRoute]: