MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / selectAuthMethod

Function selectAuthMethod

packages/plugins/mcp/src/sdk/plugin.ts:665–675  ·  view source on GitHub ↗
(
  config: McpIntegrationConfigType,
  templateSlug: string | null,
)

Source from the content-addressed store, hash-verified

663 * config-driven), so existing connections keep working. Ambiguity across
664 * several methods renders no auth rather than guessing. */
665const selectAuthMethod = (
666 config: McpIntegrationConfigType,
667 templateSlug: string | null,
668): McpAuthMethod | undefined => {
669 const methods = projectedMcpAuthMethods(config);
670 if (templateSlug !== null) {
671 const match = methods.find((method: McpAuthMethod) => method.slug === templateSlug);
672 if (match) return match;
673 }
674 return methods.length === 1 ? methods[0] : undefined;
675};
676
677const buildConnectorInput = (
678 config: McpIntegrationConfigType,

Callers 2

buildConnectorInputFunction · 0.85
plugin.tsFile · 0.85

Calls 1

projectedMcpAuthMethodsFunction · 0.85

Tested by

no test coverage detected