Files
accounted/supabase/migrations/20260905094806_provider_oauth_brand_handoff.sql
Mattsson f7f40c04e4 fix: return provider OAuth callbacks to the initiating brand domain (#2305)
* fix: hand provider OAuth callbacks back to initiating brand

* fix: encrypt provider OAuth handoff payloads

* fix: purge expired provider OAuth handoffs
2026-09-05 13:35:11 +02:00

16 lines
686 B
SQL

-- Server-only OAuth handoff back to the domain that initiated the flow.
-- Existing states keep the canonical app origin through the NULL fallback.
ALTER TABLE public.provider_otc
ADD COLUMN origin text,
ADD COLUMN provider_code text,
ADD COLUMN provider_error text;
COMMENT ON COLUMN public.provider_otc.origin IS
'Validated initiating app/brand origin; NULL for legacy OAuth states.';
COMMENT ON COLUMN public.provider_otc.provider_code IS
'Authorization code held for a two-minute handoff, deleted on consume.';
COMMENT ON COLUMN public.provider_otc.provider_error IS
'Provider error held for a two-minute handoff, deleted on consume.';
NOTIFY pgrst, 'reload schema';