Files
Enterprise-Knowledge-Base/migrations/versioned/000074_mcp_oauth_refresh_lease.up.sql
T
wizardchen 8ae82573ab fix(mcp): coordinate OAuth token refresh and authorization polling
Prevent concurrent refresh-token rotation across instances, distinguish
expired-but-refreshable tokens from active authorization, and bind OAuth
popup polling to a per-attempt ID so stale tokens cannot satisfy new consent.
2026-07-23 15:35:24 +08:00

8 lines
339 B
SQL

DO $$ BEGIN RAISE NOTICE '[Migration 000074] Adding MCP OAuth refresh lease...'; END $$;
ALTER TABLE mcp_oauth_tokens
ADD COLUMN IF NOT EXISTS refresh_lease_id VARCHAR(36),
ADD COLUMN IF NOT EXISTS refresh_lease_until TIMESTAMP WITH TIME ZONE;
DO $$ BEGIN RAISE NOTICE '[Migration 000074] MCP OAuth refresh lease ready'; END $$;