incalculable-raincoat-4574
07/09/2025, 12:39 PMusername field from our identity schema and added phoneNumber as the new identifier (identifier: true).
In our registerUser.jsonnet webhook (screenshot attached), we're attempting to send a GraphQL mutation where the username field in our Neo4j DB is set to ctx.identity.id.
However, during signup, we noticed that ctx.identity.id is still "00000000-0000-0000-0000-000000000000" — likely because the identity document hasn’t been fully created yet when the webhook triggers. This placeholder UUID ends up being saved in the database.
Has anyone faced this? Is there a way to ensure the actual identity UUID is available at webhook execution time, or should we set this manually later in a post-registration hook?
Thanks in advance!dazzling-napkin-4938
07/10/2025, 1:11 AMafter registration hook has parse: true set, then Kratos sends the webhook payload before the identity has been saved to the database, and so there will be no ID yetdazzling-napkin-4938
07/10/2025, 1:11 AMparse: false then your webhook payload will include a valid IDdazzling-napkin-4938
07/10/2025, 1:12 AMincalculable-raincoat-4574
07/10/2025, 7:05 PMafter.registration hooks — one with parse: true (to prep traits) and another with parse: false (to capture the actual identity ID and push it into our Neo4j DB via a GraphQL mutation).
However, we’re still hitting a snag:
• When both hooks are present, the Neo4j username still ends up with the null UUID (0000...), not the actual id from the Postgres identity.
• When we only keep the parse: false hook, Kratos creates the identity in Postgres, but the webhook doesn’t seem to trigger the GraphQL mutation (so no corresponding Neo4j entity is created).
Since we rely on registerUser.jsonnet to construct our user relationships/entities in Neo4j as part of the flow, this webhook step is critical for us.
Would appreciate any guidance if there’s a specific pattern/config to follow so that:
1. We receive the real ctx.identity.id
2. Our mutation gets invoked and runs as expected
I’ve attached screenshots in the thread for more context. Thanks again in advance!incalculable-raincoat-4574
07/10/2025, 7:09 PM