Skip to content

Remove HMAC key authentication method from public SDK auth docs#1994

Merged
stephentoub merged 1 commit into
mainfrom
sunbrye/remove-hmac-key-docs
Jul 15, 2026
Merged

Remove HMAC key authentication method from public SDK auth docs#1994
stephentoub merged 1 commit into
mainfrom
sunbrye/remove-hmac-key-docs

Conversation

@sunbrye

@sunbrye sunbrye commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes references to the HMAC key authentication method (CAPI_HMAC_KEY / COPILOT_HMAC_KEY) from the public Copilot SDK authentication docs. This method should not be documented publicly and appears to have been re-added by docs automation.

Changes

  • docs/auth/authenticate.md — removed the HMAC key entry from the Authentication priority list.
  • docs/auth/README.md — removed "HMAC or" from the authentication-priority summary.

Verification

  • grep -rni hmac docs/ returns no matches after the change.
  • No other files under docs/ referenced the HMAC key.

Published page affected: https://docs.github.com/en/copilot/how-tos/copilot-sdk/auth/authenticate#authentication-priority

Note

If automation keeps re-adding this content, the upstream source/generator will also need updating so the change doesn't regress.

The HMAC key auth method (CAPI_HMAC_KEY / COPILOT_HMAC_KEY) should not be
documented publicly; it was re-added by doc automation. Removes it from the
authentication priority list in authenticate.md and the summary in README.md.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 15, 2026 18:57
@sunbrye
sunbrye requested a review from a team as a code owner July 15, 2026 18:57

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 removes references to the HMAC key authentication method (CAPI_HMAC_KEY / COPILOT_HMAC_KEY) from the public Copilot SDK authentication documentation, keeping the published auth guidance limited to supported/public mechanisms.

Changes:

  • Removes the HMAC key entry from the authentication priority list in docs/auth/authenticate.md.
  • Updates the authentication priority summary in docs/auth/README.md to no longer mention HMAC.
Show a summary per file
File Description
docs/auth/README.md Updates the high-level authentication priority summary to remove HMAC references.
docs/auth/authenticate.md Removes the HMAC key item from the detailed authentication priority list.

Review details

Comments suppressed due to low confidence (1)

docs/auth/authenticate.md:307

  • The authentication priority list uses " - " between the bold label and its description. In docs/ we generally use a colon for label/description pairs (this also reads better in Markdown and avoids confusion with hyphenated terms).
1. **Explicit `gitHubToken`** - Token passed directly to the SDK client or session configuration
1. **Direct API token** - `GITHUB_COPILOT_API_TOKEN` with `COPILOT_API_URL`
1. **Environment variable tokens** - `COPILOT_GITHUB_TOKEN` → `GH_TOKEN` → `GITHUB_TOKEN`
1. **Stored OAuth credentials** - From previous `copilot` CLI login
1. **GitHub CLI** - `gh auth` credentials
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment thread docs/auth/README.md
## Authentication priority

When multiple credentials are configured, an explicit SDK token takes priority, followed by HMAC or direct Copilot API environment authentication, environment variable GitHub tokens, stored Copilot CLI credentials, and then GitHub CLI credentials. See [Authenticate Copilot SDK](authenticate.md#authentication-priority) for details.
When multiple credentials are configured, an explicit SDK token takes priority, followed by direct Copilot API environment authentication, environment variable GitHub tokens, stored Copilot CLI credentials, and then GitHub CLI credentials. See [Authenticate Copilot SDK](authenticate.md#authentication-priority) for details.
@stephentoub
stephentoub added this pull request to the merge queue Jul 15, 2026
Merged via the queue into main with commit ffb4d98 Jul 15, 2026
17 checks passed
@stephentoub
stephentoub deleted the sunbrye/remove-hmac-key-docs branch July 15, 2026 19:02
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.

3 participants