checking customerInfo.entitlements.active in the app is fine for showing a "Pro" badge, but it can't protect premium data . Log users in to RevenueCat with their Supabase user ID, receive RevenueCat webhooks in a Supabase Edge Function, re-fetch the subscriber and store the entitlement in a subscriptions table that only the server can write. Then gate premium rows with an RLS policy that calls a small has_pro() function. The app gets instant feedback from the SDK; the database enforces access.
Most RevenueCat tutorials stop when the purchase succeeds. That works until premium content lives in your database: anyone with your anon key can query Supabase directly, and an in-app check doesn't stop them.…