Fix/percistent mcp connection (#392)

* feat(oauth): add support for refresh tokens in OAuth flow and update database schema

* feat(prompts): add MCP prompts and corresponding functionality for prompt retrieval

* feat(auth): enhance error handling for refresh token operations and validation
This commit is contained in:
Mattsson
2026-05-05 13:48:53 +02:00
committed by GitHub
parent fa7d4075cf
commit c03582b5c7
10 changed files with 574 additions and 22 deletions
@@ -0,0 +1,11 @@
-- Add refresh_token_hash to api_keys for OAuth refresh-token grant support.
-- OAuth-issued keys store a SHA-256 hashed refresh token here. Direct API
-- keys (created via the settings UI) leave this column NULL.
ALTER TABLE public.api_keys
ADD COLUMN refresh_token_hash text;
CREATE UNIQUE INDEX idx_api_keys_refresh_token_hash
ON public.api_keys (refresh_token_hash)
WHERE refresh_token_hash IS NOT NULL;
NOTIFY pgrst, 'reload schema';