# Override callback post request nodejs auth0 openid connect

**URL:** <https://community.auth0.com/t/override-callback-post-request-nodejs-auth0-openid-connect/122468>\
**Category:** Get Help\
**Tags:** login-prompt-new-experience, login-experience\
**Created:** [December 6, 2023, 6:22pm UTC](https://community.auth0.com/t/override-callback-post-request-nodejs-auth0-openid-connect/122468 "2023-12-06T18:22:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elias.knudsen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/elias.knudsen/32/30462_2.png) [@elias.knudsen](https://community.auth0.com/u/elias.knudsen)\
**Post date:** [December 6, 2023, 6:22pm UTC](https://community.auth0.com/t/override-callback-post-request-nodejs-auth0-openid-connect/122468/1 "2023-12-06T18:22:09Z")

</div>

Hi. I am using nodejs with express for my rest api. I am using the auth config. Lets say the login fails, then the user gets redirected to localhost:3000/callback by default when using the auth config for express. However I want to override the post request for /callback, but still maintain most of the original functionality. I mainly just want to display the errors in a better way than a default error thrown from nodejs. For example the acces denied error, which happens when the user doesnt accept the tenant terms.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [December 30, 2023, 7:04pm UTC](https://community.auth0.com/t/override-callback-post-request-nodejs-auth0-openid-connect/122468/2 "2023-12-30T19:04:20Z")

</div>

Hi @elias.knudsen

Welcome back to the Auth0 Community!

From the Auth0 perspective the detailed error message is passed in the returned callback request. Detailed parameters are showed here [Customize Error Pages](https://auth0.com/docs/customize/universal-login-pages/custom-error-pages#parameters)

on your side you will need to have a error handler that will check for errors from callback and render proper error message.

Thanks  
Dawid

---

<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:** [January 13, 2024, 7:04pm UTC](https://community.auth0.com/t/override-callback-post-request-nodejs-auth0-openid-connect/122468/3 "2024-01-13T19:04:57Z")

</div>

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