Logout Throws Error When Using returnTo Query Parameter

Problem Statement

We are trying to set the returnTo parameter after signing out for users to get redirected back, but users received the below error.



Cause

There could be 3 causes:

  1. Logout without client ID with URL correctly set in Allowed Logout URLs in the application
  2. Logout with client ID but URL not in Allowed Logout URLs in the application
  3. Logout without client ID and URL absent in Allowed Logout URLs globally

Solution

Update the Allowed Logout URLs at the global or application level that fits your case. Be sure to append the client_id parameter if needed.

References