Following on the earlier question: I do have a multiste install on Wordpress. May I use Discourse as SSO provider for WP sites? What are the limitations? and anything I should know before making the move?
Yes, you can use Discourse as the SSO provider on a multi-site network. It is only enabled if you setup a single Discourse site as the SSO provider for all sites on the network. The reason for this is that on a multisite network all users are stored in a single database table. If multiple Discourse sites are allowed to function as the SSO provider for multiple sites in a network, there is no straightforward way to guarantee that the Discourse user ids saved on WordPress are unique.
When the WP Discourse plugin is installed on a multisite network, a Discourse tab is added to the Network Admin menu. To configure Discourse as the SSO provider for all sites on the network, go to the Network Admin page and select Discourse from the menu. Select the ‘Enable Multisite Configuration’ option and then fill in the Connection Settings. Then scroll down the page to the SSO Settings section. Select the ‘Enable SSO Client’ option. Enter your SSO Secret Key and save the settings page.
One thing to be aware of is that enabling the SSO Client functionality on a multisite network will potentially give access to any user on your Discourse forum to any site on your network.
Most of the parts being figured on the multisite. Thanks!
Now there is another issue:
When user logs in / out from wp, they logs in / out from Discourse too but, when user logs in or out from Discourse, nothing happens on WP. How could I make this a two way setup/
I already did that. When I logout from Discourse, it redirects to the homepage as you mentioned with no problem. the challenge is, when user logs out from discourse, they redirect to homepage but, the user is still signed in in subsides. Even after refreshing the page, they are still loved in.
I’ll look into this. I don’t have a multisite installation online at the moment so it might take a few days to get to it. I do test the plugin against a multisite install from time to time.
It seems that the issue is that users are not being logged out of subsites when they are logged out of the main site. I think that is something that can be solved with WordPress configuration, but I could be wrong. If you find a way to get this to work on your site, please let us know.