Skip to content

fix(copilot): add missing custom_path param to save_credentials#68

Open
marcobazzani wants to merge 1 commit into
CaddyGlow:mainfrom
marcobazzani:fix/copilot-save-credentials-missing-custom-path
Open

fix(copilot): add missing custom_path param to save_credentials#68
marcobazzani wants to merge 1 commit into
CaddyGlow:mainfrom
marcobazzani:fix/copilot-save-credentials-missing-custom-path

Conversation

@marcobazzani
Copy link
Copy Markdown

Fixes #67

Problem

DeviceCodeFlow.run() (and other OAuth flows) call provider.save_credentials(credentials, save_path) with two arguments. ClaudeOAuthProvider and CodexOAuthProvider both accept custom_path: Any | None = None, but CopilotOAuthProvider.save_credentials() only accepted one positional argument, causing:

TypeError: CopilotOAuthProvider.save_credentials() takes 2 positional arguments but 3 were given

This broke ccproxy auth login copilot entirely on v0.2.10.

Fix

Add custom_path: Any | None = None to CopilotOAuthProvider.save_credentials() for interface compatibility. The Copilot provider ignores the value (it always writes to its own storage) — this is purely a signature alignment fix.

How it was introduced

Commit 9e44f249 added --file / custom save-path support to the OAuth flows and updated the Claude and Codex providers but missed the Copilot provider.

DeviceCodeFlow (and other OAuth flows) call provider.save_credentials
with two positional arguments — credentials and save_path — matching the
signature of ClaudeOAuthProvider and CodexOAuthProvider.
CopilotOAuthProvider only accepted one positional argument, causing:

  TypeError: CopilotOAuthProvider.save_credentials() takes 2 positional
  arguments but 3 were given

This was introduced in commit 9e44f24 which added --file / custom
save-path support to the OAuth flows but forgot to update the Copilot
provider to match the new interface.

Fix: add custom_path: Any | None = None to the signature for interface
compatibility. The Copilot provider ignores the value (it always writes
to its own storage) — the parameter is purely a protocol alignment fix.
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.

fix(copilot): CopilotOAuthProvider.save_credentials() crashes with TypeError when using device code flow

1 participant