Logout redirect?

I may be blind here, but after looking through the settings and searching around for an existing topic, I can’t seem to find a way to redirect users to a page after logging out. I know I can do it programmatically, but is there a simple setting in the existing admin UI that can set a custom page to redirect to upon users logging out?

Yes, search for ‘logout’ on the admin/settings page.

6 Likes

This didn’t seem to work. Is there anyway to verify the setting took effect? It’s showing up in the settings page, but actually logging out doesn’t redirect to that page.

Try logging out while looking at the network tab of your browser’s developer tools. Select ‘preserve log’ on the network tab.

Does logout_redirect not work when sso is turned on? I can’t seem to get the changes to activate despite them sticking and saving in settings.

Are you redirecting to the SSO provider? If so, try a different logout URL with SSO enabled to see if there could be an issue with that. I once had an issue with the logout redirect set to the SSO provider on a private forum, but I can’t reproduce the problem with the latest version of Discourse.

I have it redirected to a page on the forum but that doesn’t seem to be redirecting properly.

Is your forum set to ‘login required’? If so, with SSO enabled the user will be automatically logged back in before being redirected to your logout page.

Is the logout page accessible to anonymous users? If not, the user will get a ‘page not found’ notice after logging out.

1 Like