bumpy-controller-43157
06/12/2025, 7:59 AMbrief-egg-61061
06/12/2025, 7:59 AMbrief-egg-61061
06/12/2025, 7:59 AMresponse.parse
property to true
. This way, if your external service returns a 4xx or 5xx HTTP status code, the registration flow will be interrupted and the user will not be able to sign up. Here’s an example configuration: yaml - hook: web_hook config: response: parse: true url: <https://your-validation-service/validate> method: POST body: base64://{YOUR_JSONNET_PAYLOAD}
This webhook can be added to the after
registration flow, and you can define it for specific authentication methods (like password
, oidc
, etc.) or for all methods. Yes, you can also perform this check for OIDC users. Ory allows you to define hooks for different authentication methods, including OIDC, so you can apply the same validation logic to users signing up via OIDC providers by adding the webhook under the oidc
method in your registration flow configuration. This is described in the documentation: > You can further customize the behavior of the system by defining what action to trigger based on the authentication method used to sign in, register, and update user settings. > ... > | Authentication method | Description | > | --- | --- | > | password
| Sign-in and sign-up with username/email and password combo. | > | oidc
| Sign-in and sign-up through OIDC-compliant OAuth2 identity providers. | [Actions in Ory Identities](https://www.ory.sh/docs/kratos/hooks/configure-hooks#action-triggers) For more details and examples, see the [flow-interrupting webhooks documentation](https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#flow-interrupting-webhooks) and the [customize login and registration behavior guide](https://www.ory.sh/docs/identities/sign-in/actions#customize-login-and-registration-behavior).