MCPcopy Index your code
hub / github.com/codeaashu/claude-code / fetchRemoteCredentials

Function fetchRemoteCredentials

src/bridge/remoteBridgeCore.ts:931–948  ·  view source on GitHub ↗
(
  sessionId: string,
  baseUrl: string,
  accessToken: string,
  timeoutMs: number,
)

Source from the content-addressed store, hash-verified

929// injects the trusted-device token (both are env/GrowthBook reads that the
930// SDK-facing codeSessionApi.ts export must stay free of).
931export async function fetchRemoteCredentials(
932 sessionId: string,
933 baseUrl: string,
934 accessToken: string,
935 timeoutMs: number,
936): Promise<RemoteCredentials | null> {
937 const creds = await fetchRemoteCredentialsRaw(
938 sessionId,
939 baseUrl,
940 accessToken,
941 timeoutMs,
942 getTrustedDeviceToken(),
943 )
944 if (!creds) return null
945 return getBridgeBaseUrlOverride()
946 ? { ...creds, api_base_url: baseUrl }
947 : creds
948}
949
950type ArchiveStatus = number | 'timeout' | 'error' | 'no_token'
951

Callers 2

initEnvLessBridgeCoreFunction · 0.70
recoverFromAuthFailureFunction · 0.70

Calls 2

getTrustedDeviceTokenFunction · 0.85
getBridgeBaseUrlOverrideFunction · 0.85

Tested by

no test coverage detected