WP Multisite with multiple Discourse instances

I’m a bit out of the loop as far as Discourse WordPress integration goes - especially in terms of multisite setups. See Pavilion is now maintaining and developing the WP Discourse plugin - #2 for details about that.

I don’t think anything has changed since I wrote this post: Discourse as SSO provider for Wordpress multisite - #2 by simon. The information in that post needs a topic of its own though.

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.

Essentially, if you are trying to accomplish something other than this with using Discourse as the SSO provider for a WordPress multisite network, you are on your own. It would be technically possible to allow multiple Discourse site’s to function as the SSO providers for individual sites on a WordPress network, but the required configuration for that would be overly complex. I don’t think it’s something that well ever get added to the WordPress plugin.

1 Like