respect WORKSPACE_MCP_BASE_URI everywhere

This commit is contained in:
Taylor Wilsdon
2025-06-08 12:17:06 -04:00
parent 05b9ddadb2
commit 019517beeb
4 changed files with 38 additions and 26 deletions

View File

@@ -185,8 +185,8 @@ async def start_auth_flow(
logger.info(f"[start_auth_flow] Initiating auth for {user_display_name} (session: {mcp_session_id}) with global SCOPES.")
try:
if 'OAUTHLIB_INSECURE_TRANSPORT' not in os.environ and "localhost" in redirect_uri: # Use passed redirect_uri
logger.warning("OAUTHLIB_INSECURE_TRANSPORT not set. Setting it for localhost development.")
if 'OAUTHLIB_INSECURE_TRANSPORT' not in os.environ and ("localhost" in redirect_uri or "127.0.0.1" in redirect_uri): # Use passed redirect_uri
logger.warning("OAUTHLIB_INSECURE_TRANSPORT not set. Setting it for localhost/local development.")
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'
oauth_state = os.urandom(16).hex()