Skip to content

Commit 0b41f54

Browse files
5queezerclaude
andcommitted
fix: skip cookie auth check in CLI and lifespan when OAuth is enabled
Both cli_main.ensure_authentication_ready() and auth_lifespan validate the LinkedIn cookie profile, causing exit(1) on Cloud Run where no profile exists. Skip both when OAuth mode is active. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5c5034d commit 0b41f54

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

linkedin_mcp_server/cli_main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,10 @@ def main() -> None:
339339

340340
logger.debug(f"Server configuration: {config}")
341341

342-
# Phase 1: Ensure Authentication is Ready
342+
# Phase 1: Ensure Authentication is Ready (skip for OAuth — no cookie profile needed)
343343
try:
344-
ensure_authentication_ready()
344+
if not (config.server.oauth and config.server.oauth.enabled):
345+
ensure_authentication_ready()
345346
if config.is_interactive:
346347
print("✅ Authentication ready")
347348
logger.info("Authentication ready")

0 commit comments

Comments
 (0)