Storing user first/last name, other data #226
-
Hi, I see user first/last/full name isn't stored in How do you recommend to store this & other user data? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
There are a few ways to do this. I recommend that you keep all the user data in a completely separate table. You will have:
create table public.users (
id uuid primary key references auth.users,
first_name text,
last_name text
); You can also create a trigger on the |
Beta Was this translation helpful? Give feedback.
There are a few ways to do this. I recommend that you keep all the user data in a completely separate table. You will have:
auth.users
- GoTrue only, session datapublic.users
- For your app. Will contain the user data. I recommend setting up the table something like this:You can also create a trigger on the
auth.users
table that inserts a row into the public.users table, but it's not necessary - you can handle this from your application so that once they have successfully signed up, you are returned auuid
, and you insert data intopublic.users
.