Skip to content

Conversation

@thoreinstein
Copy link

What does this PR do?

Previously, the auth command used .find() to locate the first plugin matching a provider. This allowed plugins loaded earlier to "shadow" others (e.g., opencode-websearch-cited shadowing opencode-gemini-auth), preventing OAuth options from being displayed.

This change:

  • Updates auth login to collect all matching plugins and merge their methods.
  • Adds robust type checking and error handling to the plugin loader to prevent malformed plugins from breaking the system.

Fixes #10063

How did you verify your code works?

  • run bun dev auth login
  • select Goolge
  • choose Oauth

Previously, the auth command used `.find()` to locate the first plugin matching a provider. This allowed plugins loaded earlier to "shadow" others (e.g., `opencode-websearch-cited` shadowing `opencode-gemini-auth`), preventing OAuth options from being displayed.

This change:
- Updates `auth login` to collect all matching plugins and merge their methods.
- Adds robust type checking and error handling to the plugin loader to prevent malformed plugins from breaking the system.

Fixes anomalyco#10063
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

PR #6260: fix: merge auth methods from multiple plugins for the same provider

The current PR (10065) and PR #6260 both tackle the problem of plugin shadowing by collecting authentication methods from all matching plugins instead of stopping at the first match.

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.

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

1 participant