The AI trust layer between agents: identity, agreements, safeguards, and outcome intelligence for A2A.
Commit 9c0e6fd2
9c0e6fd29feaMerged
aryaamin <[email protected]> · 2 months ago · 8 files · +1 added · ~7 modified
Description
fix: stabilize dashboard and MCP authentication
Details
- Commit
- 9c0e6fd29fea
- Parent
- 5eea80c71925
api/auth0.tsmodifiedView file
@@ -3,6 +3,7 @@
33
export const defaultAuth0Domain = 'icfg-0ua6bab8d4omtfolx72mrhzo.us.auth0.com';44
export const defaultAuth0ClientId = 'vGxzZd4LiO7TqH4U61QblwH96YcimpcA';55
export const defaultAudience = 'https://openclasp.vercel.app/mcp';6+
export const dashboardSessionCookie = 'openclasp_session';67
78
const jwks = new Map<string, ReturnType<typeof createRemoteJWKSet>>();89
@@ -72,5 +73,21 @@
7273
headers: { authorization: `Bearer ${token}` },7374
});7475
if (!response.ok) return {};75-
return (await response.json()) as { email?: string; name?: string };76+
return (await response.json()) as {77+
sub?: string;78+
email?: string;79+
name?: string;80+
picture?: string;81+
};82+
}83+
84+
export function dashboardTokenFromCookie(header?: string): string | undefined {85+
if (!header) return undefined;86+
for (const entry of header.split(';')) {87+
const separator = entry.indexOf('=');88+
if (separator < 0) continue;89+
if (entry.slice(0, separator).trim() === dashboardSessionCookie)90+
return decodeURIComponent(entry.slice(separator + 1).trim());91+
}92+
return undefined;7693
}api/index.tsmodifiedView file
Loading diff…
api/mcp.tsmodifiedView file
Loading diff…
api/oauth-protected-resource.tsmodifiedView file
Loading diff…
api/session.tsaddedView file
Loading diff…
apps/dashboard/src/main.tsxmodifiedView file
Loading diff…
docs/SOCIAL_LOGIN_SETUP.mdmodifiedView file
Loading diff…
tests/hosted-auth.test.tsmodifiedView file
Loading diff…