This commit is contained in:
Taylor Wilsdon
2026-01-28 13:07:03 -05:00
parent e7fe1ef2f9
commit d74d31ced7
3 changed files with 41 additions and 17 deletions

View File

@@ -384,14 +384,16 @@ def configure_server_for_http():
logger.info(
"OAuth 2.1 enabled using FastMCP GoogleProvider with protocol-level auth"
)
# Explicitly mount well-known routes from the OAuth provider
# These should be auto-mounted but we ensure they're available
try:
well_known_routes = provider.get_well_known_routes()
for route in well_known_routes:
logger.info(f"Mounting OAuth well-known route: {route.path}")
server.custom_route(route.path, methods=list(route.methods))(route.endpoint)
server.custom_route(route.path, methods=list(route.methods))(
route.endpoint
)
except Exception as e:
logger.warning(f"Could not mount well-known routes: {e}")