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

0
0
Asked By CuriousCoder42 On

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.

2 Answers

Answered By TechWhiz77 On

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!

Answered By DevGuru88 On

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.