<@U04UQ68083H> I would like to give users a unique...
# ory-copilot
s
@chilly-king-10285 I would like to give users a unique sign up link that will add some public_metadato the user post sign up, how would I do this kind of flow in nextjs?
c
A message from kapa.ai
To create a unique sign-up link that adds public metadata to the user post sign-up in Next.js with Ory, you would need to create a custom registration flow. While the provided knowledge sources do not provide a direct example of adding public metadata during the registration process, they do provide examples of creating custom registration flows in Next.js and other frameworks. Here's a general outline of the steps you might take: 1. Create a custom registration flow: You can use the Ory SDK to create a custom registration flow in your Next.js application. This involves creating a new instance of the
FrontendApi
class and calling the
createBrowserRegistrationFlow
method. You can find an example of this in the [knowledge source](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#create-registration-flow). 2. Generate a unique sign-up link: As part of the registration flow, you can generate a unique sign-up link for each user. This could be done by appending a unique identifier to the URL of the registration page. 3. Add public metadata to the user post sign-up: After the user completes the registration process, you can add public metadata to their account. The specifics of how to do this would depend on your implementation, but it would likely involve making a request to the Ory API to update the user's account with the desired metadata. Please note that this is a general outline and the specifics may vary based on your exact requirements and implementation. For more detailed information, you may want to refer to the [Ory documentation](https://www.ory.sh/docs/).