I am looking for event after successful password reset so that i can have count of password reset done by user.
Hi @narasing.kokane,
I am not sure what you mean by ‘JS or Angular event in UI’, but we do offer a password change hook. This will allow you to take actions asynchronously after a password change event. You could use this to call an API or to change the user metadata to record the number of password changes.
With the help of password change hook, is it possible to get value of the password change count in UI, how do i pass the value from Auth0 site to the UI.
This functionality would need to be built out by you, as it does not exist natively (you can always submit it as a feature request at our feedback page. You would need to store the changed password count data in the users app_metadata
You could setup the following flow:
- User successfully completes pw change
- Post change pw hook is run
- Post change pw hook calls the management API patch get user and returns the app metadata with the pw change count (or undefined if it is the first pw change).
- Iterate the count by 1, and call the management api patch user endpoint with the new count.
- Handle errors or too many requests.
You can then add the users app metadata to the token in a rule via a custom claim. Here is an example. It will then be available in the UI in the token.
As you can see, this is possible, but will take some configuring. Let me know if you need help with anything.
Good luck,
Dan