© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
3 replies
rinorzk

creating a new user in signup function

so I remember that I did this somehow, I think it was automatic when I set up my project, however not sure what happened and now that function along with the trigger is no longer there. So I'm trying to add it from the start and can't figure out what I am doing wrong. This is my table of profiles I want to add my new users. And this is the function I'm trying to use for the trigger:
begin
  insert into public.profiles (id, username, avatar_url)
  values (new.id, new.raw_user_meta_data->>'username', new.raw_user_meta_data->>'avatar_url');
  return new;
end;
begin
  insert into public.profiles (id, username, avatar_url)
  values (new.id, new.raw_user_meta_data->>'username', new.raw_user_meta_data->>'avatar_url');
  return new;
end;
Screen_Shot_2022-09-25_at_06.45.28.png
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

New user signup not creating profiles table record in Supabase dev branch
SupabaseSSupabase / help-and-questions
7mo ago
user signup
SupabaseSSupabase / help-and-questions
4y ago
Supabase Auth signup failing: “Failed to create user: Database error creating new user”
SupabaseSSupabase / help-and-questions
7d ago
Creating a profile immediately after signup
SupabaseSSupabase / help-and-questions
3y ago