Hi Ory Community, How do I implement flows which ...
# talk-kratos
a
Hi Ory Community, How do I implement flows which create an account in a different backend and give back the user-id/other attributes of that system? I read in the documentation that web-hooks can't update properties. Does this mean I have to write a middleware for such things? Thank you, Zoop
p
Hi @abundant-france-47554 You need to keep track of the user ID in Kratos and in the other system. Kratos creates its own IDs for the users that are created. You can do this with a middlware or with the webhooks provided in Kratos.
a
I see no way to do it with the webhooks. Is there any documentation or an example?
p
Hi @abundant-france-47554 You can add a custom hook to the registration/login after property which sends the userID in a json payload. You need to specify the payload using jsonnet
Copy code
function(ctx) { user_id: ctx.identity.id }
https://www.ory.sh/docs/kratos/self-service/hooks#web-hooks