Skip to content

Handle headless environments in OAuth login flow#31

Closed
aseembits93 wants to merge 1 commit intoadd-oauth-pkce-loginfrom
handle-headless-oauth-login
Closed

Handle headless environments in OAuth login flow#31
aseembits93 wants to merge 1 commit intoadd-oauth-pkce-loginfrom
handle-headless-oauth-login

Conversation

@aseembits93
Copy link
Contributor

Summary

  • Print the auth URL to the terminal before attempting to open the browser, so users on headless machines see it immediately
  • Wrap open/xdg-open with a 5-second timeout to prevent the script from hanging when no display is available
  • Show an explicit fallback message when the browser could not be launched, prompting the user to open the URL manually

Test plan

  • On macOS: confirm browser still opens and login completes normally
  • On Linux with a display: confirm xdg-open still works
  • On a headless Linux machine: confirm the URL is printed immediately, the 5s timeout fires without blocking the script, and the fallback message is shown

🤖 Generated with Claude Code

Print the auth URL before attempting to open the browser so users on
headless machines see it immediately. Add a 5s timeout to open/xdg-open
to prevent hanging, and show an explicit fallback message when the
browser cannot be launched automatically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aseembits93 aseembits93 changed the base branch from main to add-oauth-pkce-login March 18, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant