© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
43 replies
dastardlydoright

Cascade delete on auth.users not working

Hello all... I am evaluating supabase for an app I'm working on and am liking it so far. I am following the flutter tutorial found here:
https://supabase.com/blog/flutter-tutorial-building-a-chat-app

In the tutorial, this SQL seems to create a cascading delete between a profiles and the auth.users table:

create table if not exists public.profiles (
id uuid references auth.users on delete cascade not null primary key,
username varchar(24) not null unique,
created_at timestamp with time zone default timezone('utc' :: text, now()) not null,

-- username should be 3 to 24 characters long containing alphabets, numbers and underscores
constraint usernamevalidation check (username ~* '^[A-Za-z0-9]{3,24}$')
);
comment on table public.profiles is 'Holds all of users profile information';

but in my testing, when I delete from the profiles table - the auth user is not deleted. Am I misunderstanding something?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

On Delete Cascade
SupabaseSSupabase / help-and-questions
4y ago
RLS delete check based on auth.users.meta_data?
SupabaseSSupabase / help-and-questions
4y ago
Auth Failed to delete selected users: User not found
SupabaseSSupabase / help-and-questions
5mo ago
Can't delete without CASCADE
SupabaseSSupabase / help-and-questions
4y ago