```settings: flows: error: ui_url: <ht...
# ory-copilot
g
Copy code
settings:
  flows:
    error:
      ui_url: <http://localhost:3000/error>
    settings:
      required_aal: highest_available
      ui_url: <http://localhost:3000/settings>
      privileged_session_max_age: 1m
      after:
        password:
          hooks:
            - hook: revoke_active_sessions
        totp:
          hooks:
            - hook: revoke_active_sessions
my hooks don't work. Why?When i cahnge password, they don't get triggered @chilly-king-10285
b
A message from kapa.ai
The issue might be due to the order of your hooks. If the
session
hook is activated, it modifies the HTTP response and no other hooks are 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. To debug this issue, you can export the Ory Identities configuration and check the order of the actions. The
session
hook should be the last one to run. For more information on the
session
hook, you can refer to the [Sign in after registration](https://www.ory.sh/docs/actions/session) documentation. If the issue persists, you might want to check the [Troubleshoot Ory Actions Webhook issues](https://www.ory.sh/docs/troubleshooting/troubleshoot-actions) guide for more common issues and their solutions.
g
@chilly-king-10285 i don't have the
session
hook in it
b
A message from kapa.ai
If you don't have the
session
hook in your configuration, it's possible that there might be an issue with the
revoke_active_sessions
hook itself or the way it's configured. Here are a few things you can check: 1. Make sure that the
revoke_active_sessions
hook is correctly placed under the
after
keyword for the
password
and
totp
methods in your configuration. Your configuration should look something like this:
Copy code
yaml settings:   flows:     settings:       after:         password:           hooks:             - hook: revoke_active_sessions         totp:           hooks:             - hook: revoke_active_sessions
2. The
revoke_active_sessions
hook is designed to work with the login flow. If you're trying to use it with a different flow, it might not work as expected. You can refer to the [Available actions](https://www.ory.sh/docs/kratos/hooks/configure-hooks#available-actions) documentation for more details on which actions can be used with which flows. 3. If you're still having trouble, you might want to check the [Troubleshoot Ory Actions Webhook issues](https://www.ory.sh/docs/troubleshooting/troubleshoot-actions) guide for more common issues and their solutions. If none of these suggestions help, please provide more details about your setup and the exact issue you're facing so I can assist you better.
g
b
A message from kapa.ai
The JSON schema you're referring to is a general schema for the Ory Kratos configuration. It includes all possible configuration options, including all hooks. However, not all hooks are applicable to all flows or methods. In your case, you're trying to use the
revoke_active_sessions
hook in the settings flow for the
password
and
totp
methods. According to the [Available actions](https://www.ory.sh/docs/kratos/hooks/configure-hooks#available-actions) documentation, the
revoke_active_sessions
hook is for use only with the login flow. If you want to revoke sessions after a password change, you might need to implement a custom solution. For example, you could use the
web_hook
action to trigger a custom logic that revokes the sessions. The
web_hook
action can be used with all flows and methods except error and logout. If you need further assistance, please provide more details about your use case and the exact behavior you're trying to achieve.