Skip to content

fix: change default credential store from Keyring to Auto#31

Open
thill2-godaddy wants to merge 1 commit into
godaddy:mainfrom
thill2-godaddy:main
Open

fix: change default credential store from Keyring to Auto#31
thill2-godaddy wants to merge 1 commit into
godaddy:mainfrom
thill2-godaddy:main

Conversation

@thill2-godaddy

Copy link
Copy Markdown

Summary

  • Changes the default CredentialStore from Keyring to Auto
  • Auto tries the system keychain first and transparently falls back to an unencrypted file when the keychain is unavailable
  • Fixes auth on headless Linux and WSL2 environments where no keychain daemon is running, with no configuration change required by the user
  • Keyring remains available via --credential-store keyring or config file

Background

The Auto backend was already implemented and documented as the recommended mode for WSL/headless environments (the source comments say so explicitly). The only problem was that the default was Keyring, which hard-fails when no keychain daemon is present. This surfaces as a confusing error during auth login on WSL2.

Auto is strictly better as a default on all platforms: on macOS/Windows it uses the keychain as before; on headless Linux/WSL2 it falls back to a file rather than failing.

Test plan

  • All existing tests pass (cargo test --features pkce-auth)
  • default_keyring_mode_ignores_credential_file renamed to explicit_keyring_mode_ignores_credential_file and updated to use --credential-store keyring explicitly, preserving coverage of keyring-only behaviour

🤖 Generated with Claude Code

Auto tries the system keychain first and transparently falls back to an
unencrypted file when the keychain backend is unavailable. This fixes
auth on headless Linux and WSL2 environments where no keychain daemon
is running, without any configuration change required by the user.

Keyring remains available via --credential-store keyring or config.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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