Post Logout URL error

Auth0 is showing the following error when users try to log out of our application:

invalid_request: The “post_logout_redirect_uri” querystring parameter “XXX” is not defined as a valid URL in “Allowed Logout URLs”. To add a new URL, please do it here…

Our application is built in NextJS (pages router) and we are using the @auth0/nextjs-auth0 library.

Our api/auth/logout endpoint calls the auth0.handleLogout method, which results in users being directed to oidc/logout url on our tenant, with our configured post logout URL in the post_logout_redirect_uri query param.

I have checked in the dashboard and that exact domain is definitely set in the Allowed Logout URLs. In fact, it is the only domain that is set.

Our development application that is set up in the exact same way, but with different urls, is working as expected.

Can anyone give any pointers on what else I could look at to resolve this issue?

If it helps, here is the tracking ID for the error - 4b88cfbd67eb25097b11

Hi @brad_doctaly and welcome to the Auth0 Community!

Please check the logout request in your Network trace and ensure the route matches exactly the one set on your dashboard. Also, if you haven’t already, please check out our documentation on logging out a user.

If you have any more questions, don’t hesitate to ask!
Teodor