MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / readAuthStore

Function readAuthStore

src/mcp/auth.ts:72–78  ·  view source on GitHub ↗

Read a server's OAuth store (or undefined if none).

(serverName: string)

Source from the content-addressed store, hash-verified

70
71/** Read a server's OAuth store (or undefined if none). */
72function readAuthStore(serverName: string): McpAuthStore | undefined {
73 try {
74 return JSON.parse(fs.readFileSync(authFilePath(serverName), "utf8"))
75 } catch {
76 return undefined
77 }
78}
79
80/** Write a server's OAuth store (best-effort). */
81function writeAuthStore(serverName: string, store: McpAuthStore): void {

Callers 2

constructorMethod · 0.85
hasStoredAuthFunction · 0.85

Calls 1

authFilePathFunction · 0.85

Tested by

no test coverage detected