Clerk + Supabase: How to handle user account
Hello. I have setup authentication with clerk adding github and google authentication. I looking to add a process where the user could do more than just authenticate their github. I want to take the user id that clerk provides to add more information about the user.
Ideally, I get back userid, email and profile image. I want to the user to have a table on supabase where they could add a custom username (and many other details I want to recieve). How do I go about this?
4 Replies
why make clerk do one thing and supabase another and somhow intertwine it
just roll your own auth at this point
So I had added clerk initially. The application was small. Started to expand it and thought supabase was a good option.
Can you suggest a better way to go about the whole thing?
If you are using Clerk, just use the supabase integration and you can insert, update rows in your db for specific users in any table you want
It’s why we built the integration…. If you just need usernames just turn it on in Clerk and have the user add their username
Hello!. I actually found and used the supabase integration. I was able to get the userId so I had to create a
userId
column in my supabase table following the blog post.
So this means, I have to create a new table (for the extra information). However, I was struggling with knowing when
to collect this information since clerk (or any authentication using a provider like google, github,etc) just automatically refresh the page on signup
I didn't know clerk had the username option. I'll turn it on now