Merge branch 'main' of github.com:taylorwilsdon/google_workspace_mcp into feat/contacts-api
This commit is contained in:
14
main.py
14
main.py
@@ -288,6 +288,20 @@ def main():
|
||||
|
||||
# Set global single-user mode flag
|
||||
if args.single_user:
|
||||
# Check for incompatible OAuth 2.1 mode
|
||||
if os.getenv("MCP_ENABLE_OAUTH21", "false").lower() == "true":
|
||||
safe_print("❌ Single-user mode is incompatible with OAuth 2.1 mode")
|
||||
safe_print(
|
||||
" Single-user mode is for legacy clients that pass user emails"
|
||||
)
|
||||
safe_print(
|
||||
" OAuth 2.1 mode is for multi-user scenarios with bearer tokens"
|
||||
)
|
||||
safe_print(
|
||||
" Please choose one mode: either --single-user OR MCP_ENABLE_OAUTH21=true"
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
if is_stateless_mode():
|
||||
safe_print("❌ Single-user mode is incompatible with stateless mode")
|
||||
safe_print(" Stateless mode requires OAuth 2.1 which is multi-user")
|
||||
|
||||
Reference in New Issue
Block a user