bumpy-controller-43157
06/02/2025, 12:26 PMbrief-egg-61061
06/02/2025, 12:26 PMbrief-egg-61061
06/02/2025, 12:26 PMtoken_hook
being set per project or configuration. There is no evidence in the provided sources that multiple hooks can be registered or executed in sequence for the OAuth2 token endpoint. If you need to perform multiple actions, you would need to handle that logic within your single webhook endpoint. 2. Including the client_id as a header in the token_hook request: The documentation shows that you can configure authentication for the token hook using headers (e.g., API key in a custom header), but it does not mention the ability to automatically include the OAuth2 client_id
as a header in the request to the webhook. The payload sent to the webhook does include the client_id
in the JSON body under the session
and request
objects, but not as an HTTP header. If you require the client_id
as a header, you would need to extract it from the request body in your webhook handler, as there is no documented way to instruct Ory to add it as a header automatically [Customizing claims with OAuth2 webhooks](https://www.ory.sh/docs/hydra/guides/claims-at-refresh). Summary: - You cannot configure multiple OAuth2 token hooks; only one is supported. - The client_id
is included in the webhook payload body, not as a header, and there is no documented way to add it as a header automatically. If you need more advanced routing or header customization, you would need to implement that logic in your webhook endpoint itself.