Allowed Logout URLs list not returning the correct value

Problem statement

I added multiple URLs to “Allowed Logout URLs”. When I tried and logged out from my application, it does not give me the correct redirect. Instead, it redirects me to the first URL in the list.

Solution

How this works is when one redirects a user to the logout endpoint via the application, we need to specify a returnTo parameter which is the URL to redirect the user to after logout. If the returnTo parameter is not specified, users will be redirected to the first URL in the allowed logout URLs list.

So to solve this issue, please specify the returnTo URL and add it to the allowed logout URLs list.