handleLogout Redirect Issue

Hello team,
In my application, I am using nextjs version as 12.2.3 page based routing and autho very old version as 1.3.1. I did all configuraion required as per documentation right from tenant callback url configuration to the testing whitelist any urls if?

Problem over here is login is getting in but logout is not working at all.
handleLogout is getting invoked but its returnTo is not getting activated or in action.

Please help me and give me some suggestions

Hi Thanks for the reply I tired all these steps but nothing working
Verified client id and logout redirection URL also which i configured already. Problem here which I am guessing I am using @auth0/next-js@auth0 1.3.1 which is old version in this returnTo url got deprecated which is my guess because in internal library url.parse not working
So pls suggest the another alternative.
If I update will it work ? Lot of trials happened sir already