Skip to content

Instantly share code, notes, and snippets.

@cgimenes
Created March 13, 2025 00:03
Show Gist options
  • Save cgimenes/757a78714b422db10f9330f48b6d77ad to your computer and use it in GitHub Desktop.
Save cgimenes/757a78714b422db10f9330f48b6d77ad to your computer and use it in GitHub Desktop.
Impersonate a Supabase user using SQL
BEGIN;
SET LOCAL request.jwt.claim.sub = '<uid>';
SET LOCAL ROLE authenticated;
SELECT * FROM photos LIMIT 10;
COMMIT;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment