MCPcopy Create free account
hub / github.com/code-with-antonio/nightcode / createPkceChallenge

Function createPkceChallenge

packages/cli/src/lib/oauth.ts:15–18  ·  view source on GitHub ↗
(verifier: string)

Source from the content-addressed store, hash-verified

13}
14
15async function createPkceChallenge(verifier: string) {
16 const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(verifier));
17 return toBase64Url(new Uint8Array(digest));
18}
19
20function encodeState(state: OAuthState) {
21 return toBase64Url(JSON.stringify(state));

Callers 1

performLoginFunction · 0.85

Calls 1

toBase64UrlFunction · 0.85

Tested by

no test coverage detected