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

Function fetchRemoteCredentials

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

Source from the content-addressed store, hash-verified

976// injects the trusted-device token (both are env/GrowthBook reads that the
977// SDK-facing codeSessionApi.ts export must stay free of).
978export async function fetchRemoteCredentials(
979 sessionId: string,
980 baseUrl: string,
981 accessToken: string,
982 timeoutMs: number,
983): Promise<RemoteCredentials | null> {
984 const creds = await fetchRemoteCredentialsRaw(
985 sessionId,
986 baseUrl,
987 accessToken,
988 timeoutMs,
989 getTrustedDeviceToken(),
990 )
991 if (!creds) return null
992 return getBridgeBaseUrlOverride()
993 ? { ...creds, api_base_url: baseUrl }
994 : creds
995}
996
997type ArchiveStatus = number | 'timeout' | 'error' | 'no_token'
998

Callers 2

initEnvLessBridgeCoreFunction · 0.70
recoverFromAuthFailureFunction · 0.70

Calls 2

getTrustedDeviceTokenFunction · 0.85
getBridgeBaseUrlOverrideFunction · 0.85

Tested by

no test coverage detected