Clerk: Is it possible to create custom metadata on signup using Clerk?
I need to create a custom metadata "credits" on each new user object, is it possible to achieve that with Clerk?
One of my ideas was to call the api route after sign up which will update user object using clerkClient.
But fetch never get called because authenticateWithRedirect automatically redirects to the /dashboard as soon as sign up happens. Any ideas, how to achieve this? I need to create public metadata, so unsafeMetadata is not a solution.
3 Replies
You can create a webhook API for Clerk to notify you when a user's been created.
Webhooks | Clerk
Information about receiving event notifications with Clerk webhooks
Thanks, solved.