If already authenticated, i can access and call supabase.auth.currentUser to retrieve some user data like full_name, email, avatar_url, etc.
But how to modify the data inside it?, so when i login and authenticated, i can call supabase.auth.currentUser that contains my username.
2
Answers
Maybe there is a way by modify postgresql in supabase, but i'm beginner that don't know about it.
In here i take an example data of 'username'. If i logged in, i can call supabase.auth.currentUser where saved in cache automatically. But by default there isn't username data in there.
What do i do, after login is success, i directly request again to get username data and save it in local storage using shared_preferences plugin. Then navigate to home page.
It is recommended to create a separate table in the
public
schema to store user profiles in Supabase like this:You can read more on the managing user data guide here.