tall-angle-41306
09/05/2023, 8:45 AMafter
hooks (Docs) the documented usecase below doesn't appear to be possible:
Registration actions allow you to automate behavior in response to users registering in your application. For example, you can use Ory Actions to automatically create a user account in your database or add the user to your mailing list.The identity response in the hook doesn't contain key information, instead it just contains placeholder data, such as no identity ID etc (full response in the thread), and so there isn't a way to be able to properly associate the Kratos Identity with our account service. Is this intentional, or should I raise as a bug?
tall-angle-41306
09/05/2023, 8:47 AMafter
hook.
As you can see, a handful of fields contain placeholder data (eg identity.id = 00000000-0000-0000-0000-000000000000
{
"identity": {
"created_at": "0001-01-01T00:00:00Z",
"id": "00000000-0000-0000-0000-000000000000",
"metadata_public": null,
"recovery_addresses": [
{
"created_at": "0001-01-01T00:00:00Z",
"id": "00000000-0000-0000-0000-000000000000",
"updated_at": "0001-01-01T00:00:00Z",
"value": "<snip>",
"via": "email"
}
],
"schema_id": "default",
"schema_url": "",
"state": "active",
"state_changed_at": "2023-09-04T16:37:50.561876646Z",
"traits": {
"email": "<snip>"
},
"updated_at": "0001-01-01T00:00:00Z",
"verifiable_addresses": [
{
"created_at": "0001-01-01T00:00:00Z",
"id": "00000000-0000-0000-0000-000000000000",
"status": "pending",
"updated_at": "0001-01-01T00:00:00Z",
"value": "<snip>",
"verified": false,
"via": "email"
}
]
}
}
What's the recommended way of using these hooks for being able to associate an new identity with our internal account service?tall-angle-41306
09/05/2023, 9:02 AMtall-angle-41306
09/05/2023, 10:21 AMPostRegistrationPrePersistHooks
& PostRegistrationPostPersistHooks
. the PostPersist
hook appears to contain the correct data, implying that selfservice.flows.registration.after.hooks
runs as a PrePersist. How can I run this as a PostPersist
?square-machine-71017
09/05/2023, 10:57 AMresponse:
parse: false
configuration option. Disallowing webhook response from modifying the identity should let it run after persist phase.tall-angle-41306
09/05/2023, 11:38 AM