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

Function getCredential

apps/sim/app/api/auth/oauth/utils.ts:319–326  ·  view source on GitHub ↗
(requestId: string, credentialId: string, userId: string)

Source from the content-addressed store, hash-verified

317 * Get a credential by ID and verify it belongs to the user.
318 */
319export async function getCredential(requestId: string, credentialId: string, userId: string) {
320 const resolved = await resolveOAuthAccountId(credentialId)
321 if (!resolved) {
322 logger.warn(`[${requestId}] Credential is not an OAuth credential`)
323 return undefined
324 }
325 return getCredentialByAccountId(requestId, resolved.accountId, userId)
326}
327
328interface CoalescedRefreshOptions {
329 accountId: string

Callers 5

utils.test.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90

Calls 3

resolveOAuthAccountIdFunction · 0.85
getCredentialByAccountIdFunction · 0.85
warnMethod · 0.65

Tested by

no test coverage detected