You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(mcp): correct JWT issuer and consent response parsing
Two bugs found by the integration test:
1. /api/mcp handlers verified JWT with issuer = BETTER_AUTH_URL but
better-auth sets iss = ctx.context.baseURL which includes the /api/auth
path prefix. Fix: use BETTER_AUTH_URL + "/api/auth" as the expected
issuer in all three mcp.*.ts handlers.
2. /api/oauth/consent forwarded the Allow/Deny to better-auth but:
a) Missing Origin header caused a MISSING_OR_NULL_ORIGIN 403. Fix:
forward the incoming Origin or fall back to BETTER_AUTH_URL's origin.
b) Response body was read as { redirect_uri } but better-auth returns
{ redirect: true, url: "..." }. Fix: read json.url as the redirect URI.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments