mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 21:14:17 +02:00
Update documentation around scopes for google (#1703)
This commit is contained in:
parent
e7e96a043d
commit
bc25802a28
2 changed files with 7 additions and 6 deletions
|
|
@ -77,7 +77,10 @@ auth_provider = GoogleProvider(
|
|||
client_id="123456789.apps.googleusercontent.com", # Your Google OAuth Client ID
|
||||
client_secret="GOCSPX-abc123...", # Your Google OAuth Client Secret
|
||||
base_url="http://localhost:8000", # Must match your OAuth configuration
|
||||
required_scopes=["openid", "email", "profile"], # Request user information
|
||||
required_scopes=[ # Request user information
|
||||
"openid",
|
||||
"https://www.googleapis.com/auth/userinfo.email",
|
||||
],
|
||||
# redirect_path="/auth/callback" # Default value, customize if needed
|
||||
)
|
||||
|
||||
|
|
@ -179,7 +182,7 @@ Redirect path configured in your Google OAuth Client
|
|||
</ParamField>
|
||||
|
||||
<ParamField path="FASTMCP_SERVER_AUTH_GOOGLE_REQUIRED_SCOPES" default="[]">
|
||||
Comma-, space-, or JSON-separated list of required Google scopes (e.g., `openid,profile` or `["openid","profile"]`)
|
||||
Comma-, space-, or JSON-separated list of required Google scopes (e.g., `"openid,https://www.googleapis.com/auth/userinfo.email"` or `["openid", "https://www.googleapis.com/auth/userinfo.email"]`)
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="FASTMCP_SERVER_AUTH_GOOGLE_TIMEOUT_SECONDS" default="10">
|
||||
|
|
@ -196,7 +199,7 @@ FASTMCP_SERVER_AUTH=GOOGLE
|
|||
FASTMCP_SERVER_AUTH_GOOGLE_CLIENT_ID=123456789.apps.googleusercontent.com
|
||||
FASTMCP_SERVER_AUTH_GOOGLE_CLIENT_SECRET=GOCSPX-abc123...
|
||||
FASTMCP_SERVER_AUTH_GOOGLE_BASE_URL=https://your-server.com
|
||||
FASTMCP_SERVER_AUTH_GOOGLE_REQUIRED_SCOPES=openid,email,profile
|
||||
FASTMCP_SERVER_AUTH_GOOGLE_REQUIRED_SCOPES=openid,https://www.googleapis.com/auth/userinfo.email
|
||||
```
|
||||
|
||||
With environment variables set, your server code simplifies to:
|
||||
|
|
|
|||
|
|
@ -259,9 +259,7 @@ class OAuthProxy(OAuthProvider):
|
|||
redirect_path: Redirect path configured in upstream OAuth app (defaults to "/auth/callback")
|
||||
issuer_url: Issuer URL for OAuth metadata (defaults to base_url)
|
||||
service_documentation_url: Optional service documentation URL
|
||||
resource_server_url: Path of the FastMCP server. If None, FastMCP will
|
||||
attempt to overwrite this with the correct path to the server
|
||||
e.g. {base_url}/mcp
|
||||
resource_server_url: Path of the FastMCP server.
|
||||
allowed_client_redirect_uris: List of allowed redirect URI patterns for MCP clients.
|
||||
Patterns support wildcards (e.g., "http://localhost:*", "https://*.example.com/*").
|
||||
If None (default), only localhost redirect URIs are allowed.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue