How to Manage User Metadata During Signup with Next.js and Supabase?

June 26, 2025 3 answers
Asked by CuriousCoder42
I'm working on a signup screen where users can choose between two roles, A or B, and they are presented with different sets of questions based on their choice. There's a lot of conditional rendering going on for these roles. Currently, Clerk only accepts email and password for authentication and stores additional data in metadata. I'm looking for advice on how to route this data to Supabase and what table schemas would be suitable for distinguishing between user types A and B. I'm not asking for code, just an overall strategy would be really helpful.

Answers

DevGuru88
Reply to this answer
TechWhiz77
I think you could set up a proxy API endpoint that routes part of the signup data to Clerk and the rest to Supabase. Alternatively, consider creating a webhook for the Clerk signup event. This way, when someone signs up, Clerk triggers a webhook, which then syncs the data to Supabase. It could look something like this: user signs up on Clerk -> Clerk processes the request -> triggers a signup webhook -> webhook syncs data with Supabase. This might be a cleaner solution for handling your user data!
Reply to this answer
DevGuru88
Have you checked the Clerk documentation about role management? It might give you some insights on handling roles more effectively within your app.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions