# Need to display login page with error message rather then error page for Action token Expired

**URL:** <https://forum.keycloak.org/t/need-to-display-login-page-with-error-message-rather-then-error-page-for-action-token-expired/12922>\
**Category:** Getting advice\
**Created:** [January 7, 2022, 7:46am UTC](https://forum.keycloak.org/t/need-to-display-login-page-with-error-message-rather-then-error-page-for-action-token-expired/12922 "2022-01-07T07:46:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramchandra\_desai](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@ramchandra\_desai](https://forum.keycloak.org/u/ramchandra_desai)\
**Post date:** [January 7, 2022, 7:46am UTC](https://forum.keycloak.org/t/need-to-display-login-page-with-error-message-rather-then-error-page-for-action-token-expired/12922/1 "2022-01-07T07:46:27Z")

</div>

Hi,

User gets an link in email to reset the password. I have implemented a custom token\tokenhandler for the reset password.

If the link containing the action token is expired, error page is displayed with Action expired message. Could you please point me how can I customize this code to redirect the user to login page. I do have the encoded parameters sent in the same link as query parameters which are required to form the redirect uri.

I need to know if I can customize loginactionservice java code so that I can redirect user to login page in handletoken method where the token validation happens.

Please let me know if you have any thoughts on this.

Thanks.

---

<div class="post-metadata">

**Author:** ![Afea13](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/afea13/32/9994_2.png) [@Afea13](https://forum.keycloak.org/u/Afea13)\
**Post date:** [March 14, 2024, 1:27am UTC](https://forum.keycloak.org/t/need-to-display-login-page-with-error-message-rather-then-error-page-for-action-token-expired/12922/2 "2024-03-14T01:27:54Z")

</div>

Did you get any solution for this?
