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

Method extractStateCookie

src/server/web/auth/oauth-auth.ts:265–275  ·  view source on GitHub ↗
(req: IncomingMessage)

Source from the content-addressed store, hash-verified

263 }
264
265 private extractStateCookie(req: IncomingMessage): string | null {
266 const cookieHeader = req.headers.cookie ?? "";
267 for (const part of cookieHeader.split(";")) {
268 const eq = part.indexOf("=");
269 if (eq === -1) continue;
270 if (part.slice(0, eq).trim() === "oauth_state") {
271 return decodeURIComponent(part.slice(eq + 1).trim());
272 }
273 }
274 return null;
275 }
276}

Callers 1

setupRoutesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected