Skip to content

Allow multiple plugins to share the same provider domain #380

Closed

Description

@jonahsnider

When two plugins declare the same domain in credentials.domains, registerPluginManifest throws a "Duplicate provider domain" error. This prevents use cases where a local plugin extends a packaged plugin's capabilities against the same API -- for example, adding additional scopes to a GitHub App that the built-in @sentry/junior-github plugin already manages.

for (const domain of providerDomains(manifest)) {
const owner = state.domainToPlugin.get(domain);
if (owner) {
throw new Error(
`Duplicate provider domain "${domain}" in plugin "${manifest.name}" already declared by plugin "${owner}"`,
);
}
}

domainToPlugin is only read inside the duplicate check itself and is never used for credential routing, so the constraint seems like it can be totally removed or bumped down to just a warning. Currently I've been using pnpm patch locally to fix this, but would be nice to not need to worry about it longterm.

Activity

  1. dcramer commented on May 20, 2026

    @dcramer
    Member

    need to think this through as its pertty complicated to allow duplicate providers

  2. added a commit that references this issue on May 20, 2026
    0ff071a
  3. dcramer commented on May 20, 2026

    @dcramer
    Member

    heres what im thinking:

      // nitro.config.ts
      juniorNitro({
        pluginPackages: ["@sentry/junior-github", "@acme/github-workflows"],
        pluginOverrides: {
          github: {
            oauth: {
              scope: "repo read:org workflow",
            },
          },
        },
      });

    basically take the plugin yaml and allow you to actually just treat those as effectively defaults

  4. added 2 commits that reference this issue on May 20, 2026
    15f4bbc
    cedc974
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions