MCPcopy Create free account
hub / github.com/arctic-cli/interface / parseRefreshToken

Function parseRefreshToken

packages/arctic/src/provider/provider.ts:714–714  ·  view source on GitHub ↗
(refresh: string | null | undefined)

Source from the content-addressed store, hash-verified

712 let accessToken = currentAuth?.type === "oauth" ? currentAuth.access : null
713
714 const parseRefreshToken = (refresh: string | null | undefined) => (refresh ?? "").split("|")[0] || ""
715
716 // Check if token needs refresh (5 minutes before expiration)
717 if (currentAuth?.type === "oauth" && Date.now() > currentAuth.expires - 5 * 60 * 1000) {

Callers 1

fetchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected