Skip to content

chore: remove unused Hermes-native PKCE OAuth flow#3107

Merged
teknium1 merged 1 commit intomainfrom
chore/remove-pkce-oauth
Mar 26, 2026
Merged

chore: remove unused Hermes-native PKCE OAuth flow#3107
teknium1 merged 1 commit intomainfrom
chore/remove-pkce-oauth

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

Summary

Removes the Hermes-native PKCE OAuth flow for Anthropic that was added in 63e8832 but never wired into any user-facing flow.

What was removed (-219 lines)

  • _generate_pkce(), run_hermes_oauth_login(), _save_hermes_oauth_credentials(), read_hermes_oauth_credentials(), refresh_hermes_oauth_token()
  • Constants: _OAUTH_CLIENT_ID, _OAUTH_TOKEN_URL, _OAUTH_REDIRECT_URI, _OAUTH_SCOPES, _HERMES_OAUTH_FILE
  • Credential resolution step in resolve_anthropic_token() that checked ~/.hermes/.anthropic_oauth.json

Why

Never called from any user-facing path. Neither clawdbot/OpenClaw nor opencode implement PKCE for Anthropic — both use setup-token or API keys. Dead code using potentially unofficial OAuth endpoints.

Tests

All 621 agent tests pass.

Remove run_hermes_oauth_login(), refresh_hermes_oauth_token(),
read_hermes_oauth_credentials(), _save_hermes_oauth_credentials(),
_generate_pkce(), and associated constants/credential file path.

This code was added in 63e8832 but never wired into any user-facing
flow (setup wizard, hermes model, or any CLI command). Neither
clawdbot/OpenClaw nor opencode implement PKCE for Anthropic — both
use setup-token or API keys. Dead code that was never tested in
production.

Also removes the credential resolution step that checked
~/.hermes/.anthropic_oauth.json (step 3 in resolve_anthropic_token),
renumbering remaining steps.
@teknium1 teknium1 merged commit 910ec7e into main Mar 26, 2026
2 of 4 checks passed
outsourc-e pushed a commit to outsourc-e/hermes-agent that referenced this pull request Mar 26, 2026
Remove run_hermes_oauth_login(), refresh_hermes_oauth_token(),
read_hermes_oauth_credentials(), _save_hermes_oauth_credentials(),
_generate_pkce(), and associated constants/credential file path.

This code was added in 63e8832 but never wired into any user-facing
flow (setup wizard, hermes model, or any CLI command). Neither
clawdbot/OpenClaw nor opencode implement PKCE for Anthropic — both
use setup-token or API keys. Dead code that was never tested in
production.

Also removes the credential resolution step that checked
~/.hermes/.anthropic_oauth.json (step 3 in resolve_anthropic_token),
renumbering remaining steps.
StreamOfRon pushed a commit to StreamOfRon/hermes-agent that referenced this pull request Mar 29, 2026
Remove run_hermes_oauth_login(), refresh_hermes_oauth_token(),
read_hermes_oauth_credentials(), _save_hermes_oauth_credentials(),
_generate_pkce(), and associated constants/credential file path.

This code was added in 63e8832 but never wired into any user-facing
flow (setup wizard, hermes model, or any CLI command). Neither
clawdbot/OpenClaw nor opencode implement PKCE for Anthropic — both
use setup-token or API keys. Dead code that was never tested in
production.

Also removes the credential resolution step that checked
~/.hermes/.anthropic_oauth.json (step 3 in resolve_anthropic_token),
renumbering remaining steps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant