<@U04UQ68083H> Can I have two hooks configured for...
# ory-copilot
g
@chilly-king-10285 Can I have two hooks configured for after registration with types
web_hook
and
session
?
b
A message from kapa.ai
Yes, you can configure multiple hooks to run after registration, including the
web_hook
and
session
hooks. However, it's important to note that the
session
hook modifies the HTTP response, and no other hooks can be executed after it. Therefore, if you want to execute other hooks besides the
session
hook, you need to make sure that it is executed last. Here is an example of how you can configure these hooks:
Copy code
yaml selfservice:     flows:       registration:         after:           password:             hooks:               - hook: web_hook             - hook: session
In this configuration, the
web_hook
hook will be executed first, followed by the
session
hook. The
web_hook
hook allows you to trigger any custom, external logic. The
session
hook signs in the user immediately after they create an account. For more information on configuring hooks, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/hooks/configure-hooks#available-actions).