How can i add additional execution to "Reset Credentials" flow?

Keycloak provides “Forgot Password” functionality. It is working. By clicking this, I entered email and a link is sent to my email. On clicking the link I can reset my password.

After successful password reset, i want to execute additional functionality (lets say example: print the updated password in server). I don’t want use EventListeners. How can i add additional execution to “Reset Credentials” flow?

Thank you,
Praneeth.