supermemory/apps
MaheshtheDev 6cae175852 fix(mcp): return 503 on auth-backend outages instead of invalid_token (#1591)
Cherry-picks #1587 from @Sravanjangam, plus the OAuth half on top.

When the auth backend is slow or returns a 5xx, the MCP server currently answers `invalid_token`. That is the protocol's signal to discard the credential and re-authenticate, so a brief upstream blip logs every connected client out, and `sm_` API key users have no automatic way back. These requests now return 503 with `Retry-After: 5` so clients retry instead.

His change covered the API key path only. This shares one `transientAuthErrorFor` helper between `validateApiKey` and `validateOAuthToken`, so a JWKS timeout or a 5xx also returns 503 on the OAuth path that Claude, Cursor and browser clients use.

Genuinely bad tokens are unaffected: bad signature, expired, and no-matching-key still resolve to 401. Verified across all seven cases.

Co-Authored-By: Sravanjangam <163002695+Sravanjangam@users.noreply.github.com>
2026-08-24 15:53:06 +00:00
..
browser-extension fix(browser-extension): run wxt prepare before type checking (#1557) 2026-08-19 19:23:52 +05:30
docs docs: historical backfill guide (#1474) 2026-08-14 20:46:21 +00:00
mcp fix(mcp): return 503 on auth-backend outages instead of invalid_token (#1591) 2026-08-24 15:53:06 +00:00
memory-graph-playground fix: add type checks for TypeScript workspaces (#1447) 2026-08-13 17:55:50 +05:30
raycast-extension feat: mobile responsive, lint formats, toast, render issue fix (#688) 2026-01-21 03:11:53 +00:00
web fix(web): authenticate and bound metered /api routes (#1589) 2026-08-23 21:48:46 +00:00