End Session
Clears the browser session cookie, ends the hosted session server-side, and redirects to returnTo or /. If WorkOS can’t be reached, falls back to its hosted logout page, which ends the session and returns the browser to returnTo. Invalid returnTo values are rejected before the cookie is cleared.
Query Parameters
Destination after authentication or local logout: a path starting with / or an absolute URL on an allowed origin. Empty values are treated as omitted; the local fallback is /. External logout destinations must also be registered as sign-out redirects.
Response
Clears the session cookie and redirects to returnTo or /, the AuthKit session already revoked. When the revocation fails, redirects to the WorkOS logout URL instead, which ends the session and returns the browser to an absolute returnTo (which must then also be a configured WorkOS Sign-out Redirect).