© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
4 replies
ローリー Laurie

Creating a profile immediately after signup

I have some code so that when a user signs up, it creates a row on a profile table:

await supabase.auth.signUp({ email, password });
await supabase.from('profile').insert({username,email});
await supabase.auth.signUp({ email, password });
await supabase.from('profile').insert({username,email});


Unfortunately, when I add RLS:

CREATE POLICY "User can create own profile" ON public.profile FOR
INSERT WITH CHECK (auth.uid() = id);
CREATE POLICY "User can create own profile" ON public.profile FOR
INSERT WITH CHECK (auth.uid() = id);


The RLS stops the insert to the profile table. I figured this must be a relatively common pattern. Does anyone have any ideas?
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

creating a new user in signup function
SupabaseSSupabase / help-and-questions
4y ago
Account Hardlocked after Signup
SupabaseSSupabase / help-and-questions
2mo ago
cannot signin after signup
SupabaseSSupabase / help-and-questions
13mo ago
Trigger webhook after user signup?
SupabaseSSupabase / help-and-questions
3y ago