# Custom 'Incorrect Password' error

**URL:** <https://community.auth0.com/t/custom-incorrect-password-error/64593>\
**Category:** Get Help\
**Tags:** password, api, hooks, login\
**Created:** [June 16, 2021, 2:39pm UTC](https://community.auth0.com/t/custom-incorrect-password-error/64593 "2021-06-16T14:39:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mamacdon](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mamacdon/32/23196_2.png) [@mamacdon](https://community.auth0.com/u/mamacdon)\
**Post date:** [June 16, 2021, 2:39pm UTC](https://community.auth0.com/t/custom-incorrect-password-error/64593/1 "2021-06-16T14:39:13Z")

</div>

Does the Auth0 system provide any extensibility point for handling a “Failed Login (Incorrect Password)” event?

When the client fails to login using password auth, I want to return a more specific error code in some cases, based on user info about the account (if any) that the attempt was made against.

For example: if the `user.app_metadata.must_reset_password` flag is set, I want to show the client “you must reset your password” error rather than a generic “incorrect password” error. (I realize that this enables account-probing.)

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 23, 2021, 8:54pm UTC](https://community.auth0.com/t/custom-incorrect-password-error/64593/3 "2021-06-23T20:54:46Z")

</div>

Hi @mamacdon,

There isn’t an extensibility point for incorrect password like with post-login or change-password.

> [@mamacdon](#):
>
> For example: if the `user.app_metadata.must_reset_password` flag is set, I want to show the client “you must reset your password” error rather than a generic “incorrect password” error. (I realize that this enables account-probing.)

If this is the main use case, you may want to consider using a different pattern. If you are enforcing a password reset for your user, you should let them authenticate with the existing password, then use an action/rule to throw an error instructing them to reset their password.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 8, 2021, 8:55pm UTC](https://community.auth0.com/t/custom-incorrect-password-error/64593/4 "2021-07-08T20:55:06Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
