From 24abf2a0f08d75bbdd4228011d160c553aefd232 Mon Sep 17 00:00:00 2001 From: Taylor Wilsdon Date: Sun, 24 Aug 2025 10:37:04 -0400 Subject: [PATCH] scope the scopes --- auth/google_auth.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/auth/google_auth.py b/auth/google_auth.py index d258019..93e094e 100644 --- a/auth/google_auth.py +++ b/auth/google_auth.py @@ -14,7 +14,7 @@ from google.auth.transport.requests import Request from google.auth.exceptions import RefreshError from googleapiclient.discovery import build from googleapiclient.errors import HttpError -from auth.scopes import SCOPES +from auth.scopes import SCOPES, get_current_scopes from auth.oauth21_session_store import get_oauth21_session_store from auth.credential_store import get_credential_store from auth.oauth_config import get_oauth_config, is_stateless_mode @@ -330,7 +330,7 @@ async def start_auth_flow( ) logger.info( - f"[start_auth_flow] Initiating auth for {user_display_name} with global SCOPES." + f"[start_auth_flow] Initiating auth for {user_display_name} with scopes for enabled tools." ) # Note: Caller should ensure OAuth callback is available before calling this function @@ -347,7 +347,7 @@ async def start_auth_flow( oauth_state = os.urandom(16).hex() flow = create_oauth_flow( - scopes=SCOPES, # Use global SCOPES + scopes=get_current_scopes(), # Use scopes for enabled tools only redirect_uri=redirect_uri, # Use passed redirect_uri state=oauth_state, )