Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: How to get SignUp data to store in app db? #73

Open
dominicfarr opened this issue Sep 13, 2024 · 2 comments
Open

Q: How to get SignUp data to store in app db? #73

dominicfarr opened this issue Sep 13, 2024 · 2 comments

Comments

@dominicfarr
Copy link

I seem to be missing a step in the sign up flow. How to capture the details of a sign up?

For example: Using <SignUp redirectUrl="/dashboard" /> renders a Sign up form, which Clerk handles and redirects to configured destination.

At what point can I capture this sign up information? I need store it in the app's db?

Is there a call back I assign to the SignUp component? Or do I use a hook?

@dominicfarr
Copy link
Author

Webhooks seem to be the most suitable solution. However, given the importance of this step, webhooks are not recommended.
See Clerk Docs on Webhooks
if you are onboarding a new user, you can't rely on the webhook delivery as part of that flow. Typically the delivery will happen quickly, but it's not guaranteed to be delivered immediately or at all. Webhooks are best used for things like sending a notification or updating a database, but not for synchronous flows where you need to know the webhook was delivered before moving on to the next step. If you need a synchronous flow, please see our Onboarding Guide as one example of implementing that.

@ishworgiri1999
Copy link

I would suggest having an ensure user function on your server-side that takes care of user creation so that you have a DB user on all requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants