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

Function forceRefreshConnectionValues

packages/core/sdk/src/executor.ts:1784–1796  ·  view source on GitHub ↗
(
      row: ConnectionRow,
    )

Source from the content-addressed store, hash-verified

1782 * not OAuth-backed, or holding no refresh token — so the caller keeps the
1783 * upstream's own auth failure instead of inventing one. */
1784 const forceRefreshConnectionValues = (
1785 row: ConnectionRow,
1786 ): Effect.Effect<
1787 Record<string, string | null> | null,
1788 StorageFailure | CredentialResolutionError
1789 > =>
1790 Effect.gen(function* () {
1791 if (row.oauth_client == null || row.refresh_item_id == null) return null;
1792 const provider = credentialProviders.get(row.provider);
1793 if (!provider) return null;
1794 const access = yield* refreshConnectionToken(row, provider, "reactive");
1795 return { [PRIMARY_INPUT_VARIABLE]: access };
1796 });
1797
1798 /** The primary (`token`) value — the public seam for OAuth + single-input
1799 * callers that only ever need one value. */

Callers 1

executeFunction · 0.85

Calls 2

refreshConnectionTokenFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected