From b9361647cae6a5b0f17f68fda3ffe7944a4244f3 Mon Sep 17 00:00:00 2001 From: Taylor Wilsdon Date: Tue, 5 Aug 2025 16:38:12 -0400 Subject: [PATCH 1/2] Update auth/service_decorator.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- auth/service_decorator.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/auth/service_decorator.py b/auth/service_decorator.py index ecadfd8..24029e2 100644 --- a/auth/service_decorator.py +++ b/auth/service_decorator.py @@ -23,9 +23,7 @@ from auth.scopes import ( OAUTH21_INTEGRATION_AVAILABLE = True -# REMOVED: _extract_and_verify_bearer_token function -# This functionality is now handled by AuthInfoMiddleware - +# REMOVED: _extract_and_verify_bearer_token function. This functionality is now handled by AuthInfoMiddleware. async def get_authenticated_google_service_oauth21( service_name: str, version: str, From 13dad566078081c71a39a109961bd1a23abdadfe Mon Sep 17 00:00:00 2001 From: Taylor Wilsdon Date: Tue, 5 Aug 2025 16:39:19 -0400 Subject: [PATCH 2/2] Update auth/oauth_common_handlers.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- auth/oauth_common_handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/oauth_common_handlers.py b/auth/oauth_common_handlers.py index 8758ec4..3b4d947 100644 --- a/auth/oauth_common_handlers.py +++ b/auth/oauth_common_handlers.py @@ -140,7 +140,7 @@ async def handle_proxy_token_exchange(request: Request): if not email_verified: logger.error(f"Email address for user {user_email} is not verified by Google. Aborting session creation.") - return Response(content="Email address not verified", status_code=403) + return JSONResponse(content={"error": "Email address not verified"}, status_code=403) elif user_email: # Try to get FastMCP session ID from request context for binding mcp_session_id = None