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,google-discovery): persist pending OAuth sessions via binding store (#221)
* fix(mcp,google-discovery): persist pending OAuth sessions via binding store
The mcp and google-discovery plugins kept pending OAuth sessions in an
in-process Map on the plugin closure. In cloud, createOrgExecutor runs
per-request on Cloudflare Workers, so the redirect-back request built a
fresh plugin with an empty Map and completeOAuth failed with
"OAuth session not found".
Persist sessions through the existing KV-backed binding stores under a
new ${namespace}.oauth-sessions scoped namespace, with a 15-minute TTL
enforced via an expiresAt field filtered on read.
* refactor(mcp,google-discovery): schema-encode persisted OAuth sessions
Promote McpOAuthSession and GoogleDiscoveryOAuthSession from plain TS
interfaces to Schema.Struct definitions, and swap JSON.parse/stringify
with Schema.parseJson in both binding stores so corrupt or
schema-drifted KV entries surface a parse error instead of silently
flowing through as unchecked any. Matches the StoredBindingEntry
pattern already used in the same files.
0 commit comments