Description
Description
Plugin OAuth authentication methods are silently ignored when multiple plugins provide authentication for the same provider. Currently, the first matching plugin found "shadows" all others, preventing their authentication methods (like OAuth) from being displayed.
Root Cause
In packages/opencode/src/cli/cmd/auth.ts, the code uses Plugin.list().then(x => x.find(...)) to locate a plugin for a given provider. This returns only the first plugin found. If opencode-websearch-cited (which only supports API keys for Google) is loaded before opencode-gemini-auth (which supports OAuth for Google), the OAuth option is never presented to the user.
Plugins
opencode-gemini-auth,opencode-websearch-cited
OpenCode version
1.1.3
Steps to reproduce
- Install
opencode-gemini-auth and opencode-websearch-cited.
- Run
opencode auth login.
- Select "Google".
- Observe that only the API key prompt appears; the OAuth option is missing.
Screenshot and/or share link
No response
Operating System
macOS 26.2
Terminal
Ghostty
Description
Description
Plugin OAuth authentication methods are silently ignored when multiple plugins provide authentication for the same provider. Currently, the first matching plugin found "shadows" all others, preventing their authentication methods (like OAuth) from being displayed.
Root Cause
In
packages/opencode/src/cli/cmd/auth.ts, the code usesPlugin.list().then(x => x.find(...))to locate a plugin for a given provider. This returns only the first plugin found. Ifopencode-websearch-cited(which only supports API keys for Google) is loaded beforeopencode-gemini-auth(which supports OAuth for Google), the OAuth option is never presented to the user.Plugins
opencode-gemini-auth,opencode-websearch-cited
OpenCode version
1.1.3
Steps to reproduce
opencode-gemini-authandopencode-websearch-cited.opencode auth login.Screenshot and/or share link
No response
Operating System
macOS 26.2
Terminal
Ghostty