Skip to content

fix(cli): auth login now asks for api key in handlePluginAuth#21641

Merged
rekram1-node merged 2 commits intoanomalyco:devfrom
goniz:fix/auth-login-plugin-prompt
Apr 13, 2026
Merged

fix(cli): auth login now asks for api key in handlePluginAuth#21641
rekram1-node merged 2 commits intoanomalyco:devfrom
goniz:fix/auth-login-plugin-prompt

Conversation

@goniz
Copy link
Copy Markdown
Contributor

@goniz goniz commented Apr 9, 2026

Issue for this PR

Closes #21637

Type of change

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

What does this PR do?

This PR fixes a plugin-specific CLI auth bug where login could exit early after handlePluginAuth() succeeded, which meant the normal API key prompt never ran.
For providers using plugin auth with an API method, that created inconsistent behavior between the TUI and CLI:
the flow could authorize successfully without collecting or saving the key unless the plugin returned it itself. The change fixes that by explicitly prompting for the API key inside handlePluginAuth() and saving the entered value when authorize() does not provide one.

How did you verify your code works?

Ran it again with my fixes and the now
It prompts for the api key correctly.

Screenshots / recordings

582109BB-9993-438F-8EB9-638F0E4C9CE2.Copy.mov

Checklist

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

@rekram1-node rekram1-node merged commit ae17b41 into anomalyco:dev Apr 13, 2026
6 of 8 checks passed
alexyaroshuk pushed a commit to alexyaroshuk/opencode that referenced this pull request Apr 13, 2026
…yco#21641)

Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
mrsimpson pushed a commit to mrsimpson/opencode that referenced this pull request Apr 14, 2026
…yco#21641)

Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
sdeonvacation pushed a commit to sdeonvacation/opencode that referenced this pull request Apr 14, 2026
…yco#21641)

Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
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