MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / isCliAuthCodeCandidate

Function isCliAuthCodeCandidate

freebuff/web/src/lib/cli-auth-code-shape.ts:45–57  ·  view source on GitHub ↗
(authCode: string)

Source from the content-addressed store, hash-verified

43}
44
45export function isCliAuthCodeCandidate(authCode: string): boolean {
46 if (isOpaqueCliAuthCodeToken(authCode)) {
47 return true
48 }
49
50 const { fingerprintId, expiresAt, receivedHash } =
51 parseCliAuthCodeShape(authCode)
52 return (
53 fingerprintId.length > 0 &&
54 /^\d+$/.test(expiresAt) &&
55 CLI_AUTH_CODE_HASH_RE.test(receivedHash)
56 )
57}
58
59export function getCliAuthOnboardSearchParams(
60 searchParams: URLSearchParams,

Callers 4

handleSignInFunction · 0.90
helpers.test.tsFile · 0.85
redirectFunction · 0.85
LoginPageFunction · 0.85

Calls 2

parseCliAuthCodeShapeFunction · 0.85
isOpaqueCliAuthCodeTokenFunction · 0.70

Tested by

no test coverage detected