The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: auth hooks templates (#21153)
Kevin Grünebergb73bf7e85ac1
diff --git a/apps/studio/components/interfaces/SQLEditor/SQLEditor.constants.ts b/apps/studio/components/interfaces/SQLEditor/SQLEditor.constants.tsindex b76db0b0475..4d7055b9ebd 100644--- a/apps/studio/components/interfaces/SQLEditor/SQLEditor.constants.ts+++ b/apps/studio/components/interfaces/SQLEditor/SQLEditor.constants.ts@@ -1317,7 +1317,7 @@ as $$select last_failed_at into last_failed_atfrom public.mfa_failed_verification_attemptswhere- user_id = event->'user_id'+ user_id = (event->'user_id')::uuidandfactor_id = event->'factor_id';@@ -1367,7 +1367,9 @@ revoke executerevoke allon table public.mfa_failed_verification_attempts- from authenticated, anon;`.trim(),+ from authenticated, anon;++grant usage on schema public to supabase_auth_admin;`.trim(),},{id: 27,@@ -1391,7 +1393,7 @@ as $$select last_failed_at into last_failed_atfrom public.password_failed_verification_attemptswhere- user_id = event->'user_id';+ user_id = (event->'user_id')::uuid;if last_failed_at is not null and now() - last_failed_at < interval '10 seconds' then-- last attempt was done too quickly@@ -1437,7 +1439,9 @@ revoke executerevoke allon table public.password_failed_verification_attempts- from authenticated, anon;`.trim(),+ from authenticated, anon;++grant usage on schema public to supabase_auth_admin;`.trim(),},{id: 28,@@ -1455,7 +1459,7 @@ as $$is_admin boolean;begin-- Check if the user is marked as admin in the profiles table- select is_admin into is_admin from profiles where user_id = event->>'user_id';+ select is_admin into is_admin from profiles where user_id = (event->>'user_id')::uuid;-- Proceed only if the user is an adminif is_admin then@@ -1486,7 +1490,8 @@ grant executerevoke executeon function public.custom_access_token_hookfrom authenticated, anon;- `.trim(),++grant usage on schema public to supabase_auth_admin;`.trim(),},{