MCPcopy Index your code
hub / github.com/simstudioai/sim / getBaseProviderForService

Function getBaseProviderForService

apps/sim/lib/oauth/oauth.ts:1467–1481  ·  view source on GitHub ↗
(providerId: string)

Source from the content-addressed store, hash-verified

1465}
1466
1467function getBaseProviderForService(providerId: string): string {
1468 if (providerId in OAUTH_PROVIDERS) {
1469 return providerId
1470 }
1471
1472 for (const [baseProvider, config] of Object.entries(OAUTH_PROVIDERS)) {
1473 for (const service of Object.values(config.services)) {
1474 if (service.providerId === providerId) {
1475 return baseProvider
1476 }
1477 }
1478 }
1479
1480 throw new Error(`Unknown OAuth provider: ${providerId}`)
1481}
1482
1483export interface RefreshTokenSuccess {
1484 ok: true

Callers 1

refreshOAuthTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected