Skip to content

fix(cli): handlePluginAuth asks for api key only if authorize method exists#22475

Merged
rekram1-node merged 1 commit intoanomalyco:devfrom
goniz:fix/cli-plugin-auth-double-ask
Apr 14, 2026
Merged

fix(cli): handlePluginAuth asks for api key only if authorize method exists#22475
rekram1-node merged 1 commit intoanomalyco:devfrom
goniz:fix/cli-plugin-auth-double-ask

Conversation

@goniz
Copy link
Copy Markdown
Contributor

@goniz goniz commented Apr 14, 2026

Issue for this PR

Closes #21637

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Followup for my prev fix in PR #21641

The "opencode auth login" code in providers.ts will ask for the "api key" twice if the auth plugin declares an auth of type "api" without an "authroize" method.

How did you verify your code works?

tested with this repro plugin: https://gist.github.com/goniz/81cf9b7538e2d537c2b42a891c5524e9

Screenshots / recordings

before fix, on dev:
image

on branch, after fix:
image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions bot added contributor needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@rekram1-node rekram1-node merged commit 9a5178e into anomalyco:dev Apr 14, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(cli): auth login skips prompting for api key in plugin custom providers

2 participants