MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / verifyGitHubBotLinkState

Function verifyGitHubBotLinkState

apps/web/src/lib/bot/github-link-state.ts:43–82  ·  view source on GitHub ↗
(state: string | null)

Source from the content-addressed store, hash-verified

41 callbackPath: payload.callbackPath,
42 githubAppType: payload.githubAppType,
43 platformIntegrationId: payload.platformIntegrationId as string | undefined,
44 };
45}
46
47export function createGitHubBotLinkState(
48 userId: string,
49 installationId: string,
50 callbackPath = '/github/link',
51 githubAppType?: 'standard' | 'lite',
52 platformIntegrationId?: string
53): string {
54 return createSignedToken({
55 userId,
56 installationId,
57 callbackPath,
58 githubAppType,
59 platformIntegrationId,
60 });
61}
62
63export function verifyGitHubBotLinkState(state: string | null): VerifiedGitHubBotLinkState | null {
64 return verifySignedToken(state, {
65 ttlSeconds: STATE_TTL_SECONDS,
66 parse: parseGitHubBotLinkState,
67 });
68}

Callers 2

GETFunction · 0.90

Calls 2

signFunction · 0.70
toStringMethod · 0.65

Tested by

no test coverage detected