Keycloak password update

I need to implement “Forgot Password” functionality for keycloak and when the password updated I want to trigger my local db and update the local password as well. Also I have previously updated password policy defined in my legacy system and want to keep aligned As far as I observed I need to use EventType.UPDATE_PASSWORD event, but even this one has not the credentials in it, is there a way to implement or any sample repo ? Thanks