Hello. Is it possible to add a custom field to the...
# ory-selfhosting
a
Hello. Is it possible to add a custom field to the registration form and retrieve its value later on in a webhook? I want to implement an invite-only system but using the self-service flows. The only difference I want to make is asking the user about an invite code directly in the registration form but without adding it to the identity schema. My current workaround would be initiating a flow, asking the user for an invite code first, map it to the flow ID in my backend, proceed to render the actual registration form if the invite is valid and then check the invite code mapped to the registration flow ID in a pre persist webhook.
s
you could also create the user through the admin api if the code is valid, and then redirect them to the recovery flow instead
a
But then I'd lose the advantage of getting the registration flow UI data directly from Kratos, right?
s
Hmm I guess you could still use the registration flow to initialize the UI, but then but complete it and instead write a bit of backend code Or take a look at the blocking webhooks
a
Yeah, but if I do the invite validation only on the UI side one could just send the form data directly to Kratos using curl, that's my concern. So I think I'll stick to the webhook idea