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

Function selectAuthMethod

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

Source from the content-addressed store, hash-verified

539 * config-driven), so existing connections keep working. Ambiguity across
540 * several methods renders no auth rather than guessing. */
541const selectAuthMethod = (
542 config: McpIntegrationConfigType,
543 templateSlug: string | null,
544): McpAuthMethod | undefined => {
545 const methods = config.authenticationTemplate ?? [];
546 if (templateSlug !== null) {
547 const match = methods.find((method: McpAuthMethod) => method.slug === templateSlug);
548 if (match) return match;
549 }
550 return methods.length === 1 ? methods[0] : undefined;
551};
552
553const buildConnectorInput = (
554 config: McpIntegrationConfigType,

Callers 2

buildConnectorInputFunction · 0.85
plugin.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected