MCPcopy Create free account
hub / github.com/simstudioai/sim / fetchOAuthCredentials

Function fetchOAuthCredentials

apps/sim/hooks/queries/oauth/oauth-credentials.ts:30–45  ·  view source on GitHub ↗
(
  params: FetchOAuthCredentialsParams,
  signal?: AbortSignal
)

Source from the content-addressed store, hash-verified

28}
29
30export async function fetchOAuthCredentials(
31 params: FetchOAuthCredentialsParams,
32 signal?: AbortSignal
33): Promise<Credential[]> {
34 const { providerId, workspaceId, workflowId } = params
35 if (!providerId) return []
36 const data = await requestJson(listOAuthCredentialsContract, {
37 signal,
38 query: {
39 provider: providerId,
40 workspaceId,
41 workflowId,
42 },
43 })
44 return data.credentials ?? []
45}
46
47export async function fetchOAuthCredentialDetail(
48 credentialId: string,

Callers 2

useOAuthCredentialsFunction · 0.85

Calls 1

requestJsonFunction · 0.90

Tested by

no test coverage detected