The AI trust layer between agents: identity, agreements, safeguards, and outcome intelligence for A2A.
Commit a9e4757b
a9e4757bb766Merged
aryaamin <[email protected]> · 2 months ago · 3 files · ~3 modified
Description
fix: preserve MCP OAuth across domain migration
Details
- Commit
- a9e4757bb766
- Parent
- 088723c6b718
api/mcp.tsmodifiedView file
@@ -105,9 +105,6 @@
105105
const authenticatedHandler = withMcpAuth(mcp, verifyToken, {106106
required: true,107107
resourceMetadataPath,108-
...(process.env.OPENCLASP_MCP_URL109-
? { resourceUrl: new URL(process.env.OPENCLASP_MCP_URL).origin }110-
: {}),111108
});112109
113110
async function handler(request: Request): Promise<Response> {@@ -127,10 +124,7 @@
127124
// A missing credential is an authentication discovery challenge, not an invalid token.128125
// Cursor's V2 MCP client treats `invalid_token` while auth is still unknown as a129126
// transient connection failure instead of starting OAuth.130-
const configuredResource = process.env.OPENCLASP_MCP_URL;131-
const publicOrigin = configuredResource132-
? new URL(configuredResource).origin133-
: new URL(request.url).origin;127+
const publicOrigin = new URL(request.url).origin;134128
const headers = new Headers(response.headers);135129
headers.set(136130
'www-authenticate',api/oauth-protected-resource.tsmodifiedView file
Loading diff…
tests/hosted-auth.test.tsmodifiedView file
Loading diff…