helpful-traffic-4919
05/08/2025, 3:46 PMbrief-egg-61061
05/08/2025, 3:47 PMbrief-egg-61061
05/08/2025, 3:47 PMhelpful-traffic-4919
05/08/2025, 3:49 PM{
"$schema": "<http://json-schema.org/draft-07/schema#>",
"$id": "user-v1.json",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"title": "Email",
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
},
"webauthn": {
"identifier": true
},
"totp": {
"account_name": true
},
"code": {
"identifier": true,
"via": "email"
}
},
"recovery": {
"via": "email"
},
"verification": {
"via": "email"
}
},
"maxLength": 320
},
"displayName": {
"type": "string",
"title": "Name",
"maxLength": 30
}
},
"required": [
"email",
"displayName"
],
"additionalProperties": false
}
}
}
So you’re saying that if the displayName
property is updated, then the /selfservice/flows/settings/after/profile/hooks
hook would be triggered - is that right?brief-egg-61061
05/08/2025, 3:50 PMbrief-egg-61061
05/08/2025, 3:50 PMdisplayName
property (or any other trait) is updated via the Ory Settings/Profile flow, the configured webhook for the after
settings/profile flow (i.e., /selfservice/flows/settings/after/profile/hooks
) will be triggered. This is explicitly supported by Ory, as hooks can be configured to run after a profile update is successful, and this includes updates to any identity traits defined in your schema, such as displayName
or email
[Settings and profile updates](https://www.ory.sh/docs/kratos/self-service/flows/user-settings#hooks). To summarize: - When a user updates their profile (traits) through the settings flow, the after
settings/profile webhook is triggered. - This applies to any trait, including your custom displayName
field. If you want the webhook to modify the identity in response, you must ensure the webhook is configured to parse the response and return the updated traits in the correct format [Modify identities](https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#modify-identities).