Logout redirect?


(George Kushnir) #1

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?


(Simon Cossar) #2

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


(George Kushnir) #3

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.


(Simon Cossar) #4

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


(George Kushnir) #5

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.


(Simon Cossar) #6

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.


(George Kushnir) #7

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


(Simon Cossar) #8

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.