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?