Closed Pakile closed 10 months ago
I'm facing the same issue 😦
Hello,
Did you guys created a profile table and added a trigger to add a row to your public.profiles table every time a user signs up, you can use triggers.
https://supabase.com/docs/guides/auth/managing-user-data
I hope that it'll fix your issue.
This is trigger I used
-- inserts a row into public.profiles
create or replace function public.handle_new_user()
returns trigger
language plpgsql
security definer
as $$
begin
INSERT INTO public.profiles (id, updated_at, full_name, avatar_url)
SELECT
new.id,
CURRENT_TIMESTAMP,
COALESCE(jsonb_extract_path_text(new.raw_user_meta_data, 'full_name'), NULL),
COALESCE(jsonb_extract_path_text(new.raw_user_meta_data, 'picture'), jsonb_extract_path_text(new.raw_user_meta_data, 'avatar_url'), NULL);
return new;
end;
$$;
Don't close this issue. It still exists. Anyone downloading this project is going to run into the same issues. The instructions are not clear and do not work correctly.
Description
After logging in with a Google or GitHub account, the system fails to add user information to the
profiles
table as expected. This poses difficulties in managing and displaying user information.Steps to Reproduce
profiles
table to see if user information has been added.Expectation
After logging in with Google or GitHub, user information should be automatically added to the
profiles
table.Note
This issue is not present on the ub.cafe site.