flaky-kilobyte-10585
02/21/2025, 9:50 AMbrief-egg-61061
02/21/2025, 9:50 AMbrief-egg-61061
02/21/2025, 9:51 AMyaml hook: web_hook config: response: parse: true
2. In your webhook implementation, you can decide whether to allow the flow to continue or interrupt it based on your custom logic. The flow interruption is determined by the HTTP response code returned by your webhook: - For HTTP response codes 1xx, 2xx, and 3xx, the flow is not interrupted. - For HTTP response codes 4xx and 5xx, the flow is interrupted, and a predefined payload is returned. 3. If you want to interrupt the flow, your webhook should return a 4xx or 5xx status code along with a payload that explains the reason for the interruption. Here's an example payload: json { "messages": [ { "instance_ptr": "#/traits/foo/bar", "messages": [ { "id": 123, "text": "Login not allowed due to custom condition", "type": "error", "context": { "reason": "Custom condition not met" } } ] } ] }
This approach allows you to implement custom logic to interrupt the login flow based on your specific requirements. For more detailed information on implementing flow-interrupting webhooks, you can refer to the [Ory documentation on flow-interrupting webhooks](https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#flow-interrupting-webhooks).