Skip to content

Plugin OAuth auth methods silently ignored (shadowed by other plugins) #10063

Closed as not planned

Description

@thoreinstein

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

  1. Install opencode-gemini-auth and opencode-websearch-cited.
  2. Run opencode auth login.
  3. Select "Google".
  4. 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

Activity

  1. github-actions commented on Jan 22, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. added a commit that references this issue on Jan 22, 2026
    99c1c8c
  3. manascb1344 commented on Feb 8, 2026

    @manascb1344

    Linking #8297 for reference!

  4. manascb1344 commented on Feb 8, 2026

    @manascb1344

    Same issue here: opencode auth login -> Select Google -> only "Enter your API key" is shown; "OAuth with Google (Antigravity)" never appears.

    • OpenCode 1.1.53, installed via curl -fsSL https://opencode.ai/install | bash
    • Plugin in config: opencode-google-antigravity-auth (shekohex)
    • DEBUG log shows the plugin loads: service=plugin path=opencode-google-antigravity-auth loading plugin
    • Tried: system terminal (not IDE), running from cd ~, waiting 5+ seconds before selecting Google, full reinstall with opencode uninstall --keep-config --keep-data then install script again. No change.

    So the plugin loads but its OAuth method is not shown for Google; only the API key prompt appears. Likely the same root cause as this issue (plugin auth methods ignored or overwritten for Google).

  5. manascb1344 commented on Feb 8, 2026

    @manascb1344

    Found the root cause and fixed it on my end.

    The issue was opencode-websearch-cited also registering auth for the google provider. With two plugins registering for the same provider, only one survives (#6261) - and the API-key-only one won.

    Fix: Removed opencode-websearch-cited from my plugin list so only opencode-antigravity-auth registers for Google. OAuth option appeared immediately after that.

    So this is a symptom of #6261 (multiple plugins registering auth for the same provider silently overwrite each other). The fix in PR #6260 would resolve this properly by merging auth methods from all plugins.

  6. Techie5879 commented on Feb 8, 2026

    @Techie5879

    I dont understand why this is happening with me for OpenAI -- I have 3 plugins installed -

    "opencode-antigravity-auth@latest",
    "opencode-websearch-cited@1.2.0",
    "opencode-antigravity-quota@0.1.6"
    

    None of them should modify openai auth - but not sure whats happening here? Trying to auth with chatgpt subscription (Teams) is not possible either via opencode auth login or /connect

  7. rekram1-node commented on Feb 8, 2026

    @rekram1-node
    Contributor

    @Techie5879 what error are u seeing?

  8. Techie5879 commented on Feb 8, 2026

    @Techie5879

    @rekram1-node

    i seem to have narrowed it down to the web-search-cited plugin

    With web-search-cited enabled and trying to do opencode auth login or even /connect:

    I see no errors, but I see: (note openx is just an alias to opencode for me)

    Image

    Commenting the plugin out in .jsonc gives:

    Image

    Note: I have followed websearch-cited note of putting it at last and it still messes with the auth flow. I think the plugin is silently failing somehow (?) or affecting the auth flow. debug logs show nothing so far

  9. balaji-dutt commented on Feb 18, 2026

    @balaji-dutt

    I've been hit by this bug and notice that @rekram1-node just merged #13921 to dev. Wondering if that will fix this issue as well?

  10. murtuzaalisurti commented on Feb 25, 2026

    @murtuzaalisurti

    @Techie5879 experiencing the same, I also have the "opencode-websearch-cited@1.1.1" plugin listed at the end, removing it worked.

  11. github-actions commented on Apr 27, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions