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

Function parseOAuthStateOwner

apps/web/src/lib/integrations/oauth/common.ts:39–49  ·  view source on GitHub ↗
(owner: string)

Source from the content-addressed store, hash-verified

37export function organizationAccessDenialErrorCode(error: unknown): string | null {
38 if (!(error instanceof TRPCError) || error.code !== 'UNAUTHORIZED') return null;
39 if (error.message === 'You do not have access to this organization') {
40 return 'organization_access_required';
41 }
42 return 'permission_required';
43}
44
45type AuthenticatedOAuthUser = User;
46
47/**
48 * An organization OAuth connect stores a credential, so it is membership-only:
49 * a staff or support grant never stands in (SUPPORT_NEVER_KEYS), and OAuth
50 * state never carries staff authority.
51 */
52export type ResolveConnectOwnerOptions = {

Calls

no outgoing calls

Tested by

no test coverage detected