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

Function readCodexAuthFile

packages/arctic/src/auth/codex.ts:113–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111 }
112
113 async function readCodexAuthFile(): Promise<CodexCliAuthFile | null> {
114 try {
115 const filePath = path.join(resolveCodexHome(), CODEX_AUTH_FILENAME)
116 const contents = await fs.readFile(filePath, "utf8")
117 return JSON.parse(contents) as CodexCliAuthFile
118 } catch {
119 return null
120 }
121 }
122
123 function extractIdToken(raw: CodexCliTokenSet["id_token"]): string | undefined {
124 if (!raw) return undefined

Callers 1

Calls 1

resolveCodexHomeFunction · 0.70

Tested by

no test coverage detected