Refresh sso groups

We use the official Discourse sso and pass a set of groups via add_groups/remove_groups. However now we’re looking for a good way to “refresh” the list of groups. Can anyone think of a way to do this without having the user have to logout/login?

Yeah … you would use the sync_sso route, you just pass it the sso payload and it updates all the data without logging the user out.

5 Likes

When/how would that happen?

3rd party app would run it at its discretion.

For example … master user account updates profile picture on master site … call sync_sso to pass it to Discourse in a background job.

3 Likes

Hi Jay. Have you successfully used sync_sso? If so, would you mind sharing some example code?

I’ve got nothing at hand. If you want help here, start a new topic, say what membership stuff you’re using and what you’re trying to accomplish. I think you just need a few lines in whatever membership thing you’re using to push the stuff over.

Lots of stuff has gotten better in the wp-discourse plugin which might solve your problem pretty easily.

2 Likes

You can find details about using the sync_sso route to refresh sso data here: Sync SSO user data with the sync_sso route

3 Likes