SAML logout not redirecting to returnTo URL, stuck on screen that says OK

Problem statement

We are using a SAML connection in one of our Auth0 tenants (SP tenant) to connect to another Auth0 tenant with the SAML add-on (IdP tenant). We are trying to logout of both the SP and IdP, but are not getting redirected back to the ‘returnTo’ URL after getting logged out of the IdP. We are just being left on a white screen that says “OK”.

Solution

If the custom domain from the SP tenant is used to begin the SAML logout flow, then the IdP needs to be configured to use the custom domain as well for the Single Logout Service URL, or else the final redirect to the ‘returnTo’ URL will not occur.