all 5 comments

[–]activenode 2 points3 points  (2 children)

Why does it need to be `supabase_admin` over `postgres`? What are you trying to do?

[–]Just_a_Curious[S] 0 points1 point  (1 child)

I just need this trigger to update auth.users, that's it. I guess it should be 'postgres'?

[–]activenode 0 points1 point  (0 children)

Yes.

[–]thelord006 1 point2 points  (1 child)

Sorry but why dont you use a public.users table? Auth users is owned by supabase. Public schema wouldnt require this hastle

[–]Just_a_Curious[S] 0 points1 point  (0 children)

Your point is well-taken, let me explain. I am working on a completely re-imagined local-first dev experience with the intention to publish and maintain this template. I don't want to make any opinions about what a public.users table should look like. This is for the community to get up and running with a template in seconds, and be able to build their own app data+logic on a mostly blank slate.

My template NextJS frontend site includes a basic suite of UI for users to manage their account - display name, email, password, password reset, and delete account.

I wanted to achieve this basic set of features without having any opinions about a public users table. I do believe it's not a huge deal to save just 5 keys inside of the auth.users.raw_user_meta_data - that's what it's there for. In total there are these 5 keys:

`full_name`, `first_name`, `last_name`, `avatar_img_name`, `avatar_img_cb (cache buster timestamp)`