Trying to insert user into auth.users table using ...
# help
b
Trying to insert user into auth.users table using rpc. Know how I can achieve this cleanly ?
n
Hello @Borisdm! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
g
You really should consider using https://supabase.com/docs/reference/javascript/auth-api-createuser from a server or edge function There are a couple of discussion on Github on generating the user in a postgres function and it is not pretty and if I remember involves two tables.
https://github.com/supabase/supabase/discussions/5248 https://github.com/supabase/supabase/discussions/5043 And remember even if you get it to work, the structure can (and will likely) change at least in low level details.
b
I wasn't able to achieve any reuslt from this. I wonder of there is alternative way to accomplish this . I don't want user registration to be open to public
Thanks @garyaustin was able to find a solution using theo-m's method 🙂