logout redirection fails even though I have listed the redirect url under the application Allowed Logout URLs.
The “returnTo” querystring parameter is not defined as a valid URL in “Allowed Logout URLs”. To add a new URL, please do it here: https://manage.auth0.com/#/account/advanced
I have added the logout url to the allowed logout urls and it makes no difference
Although you are URL encoding the returnTo parameter, the URL you use in the Allowed Logout URLs should be the non-encoded URL.
As you are not passing a client_id parameter in your /logout call, the URL needs to be whitelisted at the tenant level, rather than at the application level. You can add the URL to your tenant-level Allowed Logout URLs from the tenant settings.
The following documentation outlines the above in more detail: