Our domain is “www.abc.comm”, and we use language codes in the URL (e.g., /en/ for English). We have set /en/business-group/cart as the callback URL in Auth0 for authentication. This setup was working correctly, but recently, after authentication, users are being redirected to an incorrect URL such as www.abc.com/en/business-group/cart/en/business-group/cart instead of the intended www.abc.com/en/business-group/cart.
We noticed that the response header from the Auth0 callback contains a Location key with this incorrect path. This issue is affecting all our applications, and the redirect path seems to vary based on the selected language. We are unable to identify the root cause and cannot provide even a temporary fix at this time. Our project is built with Next.js.
Can anyone help us identify the root cause of this redirect issue and suggest a solution?