Refresh sso groups


(Carlo Kok) #1

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?


(Sam Saffron) #2

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.


(Jay Pfaffman) #3

When/how would that happen?


(Sam Saffron) #4

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.


(Leah Kramer) #5

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


(Jay Pfaffman) #6

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.