Skip to content

Support headless login with --no-open - #42

Open
ryanduguid wants to merge 2 commits into
XeroAPI:mainfrom
ryanduguid:fix/headless-login
Open

ryanduguid wants to merge 2 commits into
XeroAPI:mainfrom
ryanduguid:fix/headless-login

Conversation

@ryanduguid

Copy link
Copy Markdown
Contributor

Summary

  • add xero login --no-open to print the OAuth authorisation URL without launching a browser
  • preserve the existing browser-opening behaviour by default
  • document SSH port forwarding for the localhost callback on remote and headless machines
  • cover the command wiring and both OAuth launch modes with tests

Closes #7.

Verification

  • npm test (133 tests)
  • npm run build
  • node bin/run.js login --help
  • git diff --check origin/main...HEAD

Risks and limitations

  • A live Xero OAuth sign-in was not exercised because it requires a configured Xero app and account.
  • --no-open remains an interactive PKCE flow; it does not add device-flow or service-account authentication.
  • The repository does not define a lint command.

ryanduguid and others added 2 commits August 29, 2026 11:42
Add --no-open so remote CLI sessions can print the OAuth URL while preserving the localhost callback. Document SSH port forwarding and cover both login modes with tests.
@ryanduguid

Copy link
Copy Markdown
Contributor Author

These XeroAPI PRs are ready for review when someone has time:

Each description lists its checks.

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.

Headless/Server Environment: OAuth flow requires browser, no documented headless auth path

1 participant