Confusion over SSO settings changes


(Joe Gilham) #1

Hey,

Apologies if this has already been covered but I couldn’t find a topic that gave me what I needed. I’m fairly new to discourse but when the settings changed with an update to the WP-Discourse plugin did anything change with regards to the way SSO works?

The settings read as though when a user is created in wordpress a user should automatically get created in discourse. This occurs for me when a user visits the discourse forum (a user is created and they are automatically signed in).

The issue for me is that we are dealing with memberships and want to use those memberships to control access levels on the forum. I have the access levels figured but need immediate access to the discourse user to update accordingly. Does this mean I will need to manually fire an API call to create a discourse user? If so, do you foresee any issues with SSO if I do this?

Any help would be greatly appreciated.
Thanks!


(Simon Cossar) #2

This should only be happening if you have selected the ‘Create Discourse User on Login’ setting on the SSO Provider tab, otherwise the user won’t be created until they log into the forum, either by clicking the ‘login’ button on Discourse, or by clicking a login link on the WordPress site.

Yes, I think the best way to approach it with a membership plugin is to create the Discourse user through the API when they register for a membership. This won’t create any issues with SSO. The first time they login to the forum the Discourse user will be matched with the WordPress user through their email address.

Which membership plugin are you using? I’ve made a plugin that works with the WIshList Member plugin. I think it does what you are looking for.


(Joe Gilham) #3

Thanks for the speedy and in depth response, much appreciated. It seems, however, that users are only created upon visiting the forum when that option is selected. I can utilise the API to create users as mentioned but was curious as to whether I was missing something as the setting reads as though users should be created straight away.

This is for a client and they are using memberpress. Everything regarding user levels is already hooked up and working it’s just the initial creation of users that was confusing :slight_smile:


(Simon Cossar) #4

Yes, it just redirects them to the forum and then back to the WordPress site. It’s probably better to not enable it for your case.