DEV Community

Discussion on: Creating User Profiles on Sign-Up in Supabase

Collapse
 
dailydevtips1 profile image
Chris Bongers • Edited

Hi Sebastian!

Thanks for this amazing article, trying this as well. but hitting a error when even using the plain ID only function.

I'm using GitHub as my login, but I always get redirect with:
http://localhost:3000/?error=server_error&error_description=Database+error+saving+new+user

Is there any way to see what would be wrong?

-- Edit
Managed to get it working with the following:

begin
  insert into public.profiles (id)
  values (new.id);
  return new;
end;
Enter fullscreen mode Exit fullscreen mode
Collapse
 
sruhleder profile image
Sebastian Ruhleder

Hi Chris!

I assume the use of:

NEW.raw_user_meta_data ->> 'user_name'
Enter fullscreen mode Exit fullscreen mode

doesn't work with GitHub?! 🤔

The following PR has introduced this feature: github.com/supabase/gotrue/pull/127

I haven't had time to look deeper into this, but the gotrue repo of supabase should be the right place to investigate (or open an issue).

Glad you could fix it and you enjoyed the article!