We use discourse together with wordpress, which is the sso provider.
After latest update of discourse docker container and the wp discourse plugin, I am not able to access discourse forums while logged in. It always redirects to the Wordpress dashboard, after entering the credentials, instead of showing main Discourse page.
I suspect that it is some simple discourse redirection causing this, can somebody advice where to look first, what can be causing this? The discourse admin pages became inaccessible because of this issue, but I can edit things on commandline,of course.
Simon, thanks for reply. I checked the plugin status and it is activated. After forum searching, I am now able to access discourse admin pages using sso bypass ( /users/admin-login url ). I will check all the related sso options on Discourse side. The issue persists.
Martin
It’s possible that there is an issue with the SSO redirect from WordPress to Discourse that occurs after authentication on WordPress. Do you know if you have any other WordPress plugins installed that could be altering the ‘allowed_redirect_hosts’?
Temporarily solved by adding our discourse host to the hosts array in allow_discourse_redirect function manually.
Would it be of use to add this list of hosts to the Discourse sso configuration in wp Dashboard?
From what I understand about your setup, you have two URLs pointing at your forum, with the first one redirecting to the second one. I’m not sure if an option should be added to the plugin for dealing with that situation.
For now, instead of editing the plugin’s code, you can add to the allowed hosts array in your theme’s functions.php file by doing something like this: