MCPcopy Create free account
hub / github.com/codeaashu/claude-code / generateCodeChallenge

Function generateCodeChallenge

src/services/oauth/crypto.ts:15–19  ·  view source on GitHub ↗
(verifier: string)

Source from the content-addressed store, hash-verified

13}
14
15export function generateCodeChallenge(verifier: string): string {
16 const hash = createHash('sha256')
17 hash.update(verifier)
18 return base64URLEncode(hash.digest())
19}
20
21export function generateState(): string {
22 return base64URLEncode(randomBytes(32))

Callers

nothing calls this directly

Calls 2

base64URLEncodeFunction · 0.85
updateMethod · 0.65

Tested by

no test coverage detected