mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-23 22:14:18 +02:00
Add WorkOS and Azure OAuth providers (#1550)
This commit is contained in:
parent
04ba8619fb
commit
c3d1176a69
47 changed files with 2488 additions and 169 deletions
|
|
@ -6,7 +6,7 @@ Demonstrates FastMCP server protection with GitHub OAuth.
|
|||
|
||||
1. Create a GitHub OAuth App:
|
||||
- Go to GitHub Settings > Developer settings > OAuth Apps
|
||||
- Set Authorization callback URL to: `http://localhost:8000/oauth/callback`
|
||||
- Set Authorization callback URL to: `http://localhost:8000/auth/callback`
|
||||
- Copy the Client ID and Client Secret
|
||||
|
||||
2. Set environment variables:
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ auth = GitHubProvider(
|
|||
client_id=os.getenv("FASTMCP_SERVER_AUTH_GITHUB_CLIENT_ID") or "",
|
||||
client_secret=os.getenv("FASTMCP_SERVER_AUTH_GITHUB_CLIENT_SECRET") or "",
|
||||
base_url="http://localhost:8000",
|
||||
# redirect_path="/oauth/callback", # Default path - change if using a different callback URL
|
||||
# redirect_path="/auth/callback", # Default path - change if using a different callback URL
|
||||
)
|
||||
|
||||
mcp = FastMCP("GitHub OAuth Example Server", auth=auth)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue