Hi folks :wave: — looking for input on an issue we...
# general
i
Hi folks 👋 — looking for input on an issue we're facing with ORY Kratos. We've removed the
username
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!
d
if your
after 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 yet
if you have
parse: false
then your webhook payload will include a valid ID
🙏 1
we use both webhooks - a before save hook (parse: true) to set some metadata_admin on the identity, and then a second hook that is called after save so we can add the Kratos identity ID to our database
i
Thanks so much, @dazzling-napkin-4938 — this really helped clarify the behavior. I’ve now tried configuring both
after.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!
Screenshot 2025-07-11 at 12.37.36 AM.png