Skip to content

docs(oauth): stdio OAuth login guide + OAuth-first install config (4/4)#2717

Draft
SamMorrowDrums wants to merge 1 commit into
sammorrowdrums/oauth-build-releasefrom
sammorrowdrums/oauth-docs
Draft

docs(oauth): stdio OAuth login guide + OAuth-first install config (4/4)#2717
SamMorrowDrums wants to merge 1 commit into
sammorrowdrums/oauth-build-releasefrom
sammorrowdrums/oauth-docs

Conversation

@SamMorrowDrums

Copy link
Copy Markdown
Collaborator

Stack: #2704 (1/4) → #2710 (2/4) → #2711 (3/4) → this (4/4). Review/merge bottom-up. Base is the PR3 branch; diff is the docs layer only.

Closes the OAuth stdio work by documenting it and flipping the local install configs to OAuth-first now that no PAT is required on github.com.

What's here (3 files)

  • docs/oauth-login.md (new) — dedicated guide:
    • How it works: PKCE preferred; display channels (browser → URL elicitation → tool-response message); transparent GitHub App token refresh.
    • Quick start (native binary recommended; VS Code config).
    • Configuration reference: --oauth-client-id/-secret/-scopes/-callback-port + GITHUB_OAUTH_* env vars; PAT still takes precedence.
    • Scope filtering (requested scopes also filter the tool list).
    • Running in Docker: fixed port 8085, -p 127.0.0.1:8085:8085, register http://localhost:8085/callback; documents the two fixed-port safety properties — loopback-only publish + a busy port is fatal (no silent device fallback).
    • Headless / device-code fallback; URL-elicitation security advisory.
    • Bring your own app: links to create an OAuth App vs register a GitHub App; loopback redirect-URL rules.
    • GHES / ghe.com (Proxima): must bring their own app; --gh-host directs login at that instance's authorization server.
    • Build-from-source with baked-in creds via ldflags.
  • README.md — stdio Docker install badges are now OAuth-first (fixed callback port 8085, no PAT prompt); Prerequisites reframed (OAuth default, PAT optional) with a pointer to the guide; one-line OAuth pointer by the manual examples. No README pollution beyond that.
  • server.jsonGITHUB_PERSONAL_ACCESS_TOKEN is now optional; the package publishes the OAuth callback port so the registry default works with zero token.

Validation

  • server.json validated against the 2025-12-11 registry schema (valid) and python -m json.tool (the registry-releaser check).
  • Install badge URLs decoded and round-tripped to the intended Docker configs.
  • All new-doc TOC anchors and cross-doc links resolve.
  • Reverted the inherited generated-docs churn (docs/feature-flags.md, docs/insiders-features.md) so this PR is docs-for-OAuth only; that drift is already correct on main and resolves on rebase.

No workflow scope needed (no workflow files touched).

… config

Add a dedicated Local Server OAuth Login guide (docs/oauth-login.md) covering
the PKCE/device flows, display channels and the URL-elicitation security
advisory, scope-based tool filtering, the fixed-port Docker recipe and its
loopback/port-safety behavior, bringing your own OAuth or GitHub App, and the
GitHub Enterprise Server / ghe.com requirement to register an app on that host
(custom --gh-host directs login at that instance's authorization server).

Reflect that the local server now logs in with OAuth by default on github.com:
- README: make the stdio Docker install badges OAuth-first (fixed callback port
  8085 published to loopback), drop the PAT prompt, and reframe the PAT as an
  optional alternative with a pointer to the new guide.
- server.json: make GITHUB_PERSONAL_ACCESS_TOKEN optional and publish the OAuth
  callback port so the registry default works without a token.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the stdio OAuth rollout by documenting the OAuth login flow and updating default install/config surfaces to be OAuth-first (with PAT optional), including the fixed Docker callback-port setup needed for containerized login.

Changes:

  • Adds a dedicated docs/oauth-login.md guide covering stdio OAuth (PKCE/device flow), Docker fixed-port requirements, and BYO app guidance for GHES/ghe.com.
  • Updates README.md one-click Docker install badges and prerequisites wording to default to OAuth-first while keeping PAT as an optional precedence override.
  • Updates server.json so GITHUB_PERSONAL_ACCESS_TOKEN is optional and publishes the fixed OAuth callback port configuration for container installs.
Show a summary per file
File Description
docs/oauth-login.md New end-to-end stdio OAuth login documentation (including Docker fixed-port guidance).
README.md Switches local Docker install badges + prerequisites messaging to OAuth-first with a link to the new guide.
server.json Makes PAT optional and adds fixed callback port publish/env defaults for registry-driven Docker installs.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 1

Comment thread docs/oauth-login.md
| Flag | Environment variable | Description |
|------|----------------------|-------------|
| `--oauth-client-id` | `GITHUB_OAUTH_CLIENT_ID` | OAuth App or GitHub App client ID. Enables OAuth login when no token is set. Defaults to the baked-in app on github.com for official builds. |
| `--oauth-client-secret` | `GITHUB_OAUTH_CLIENT_SECRET` | Client secret, **if your app requires one**. For distributed clients this is a public, non-confidential credential. |
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.

2 participants