(requestId: string, credentialId: string, userId: string)
| 317 | * Get a credential by ID and verify it belongs to the user. |
| 318 | */ |
| 319 | export 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 | |
| 328 | interface CoalescedRefreshOptions { |
| 329 | accountId: string |
no test coverage detected