julianlam / nodebb-plugin-session-sharing

Allows login sessions from your app to persist in NodeBB
MIT License
88 stars 65 forks source link

Enabling Group Syncing With Your Plugin #52

Closed Steve-MP closed 6 years ago

Steve-MP commented 6 years ago

With reference to your documentation:

Additionally, if group syncing is enabled, you can specify groups and list groups that the user is in. They will be joined (or left) automatically based on what is found in the payload.

Can you expand on this a little?

What format should the group list be supplied in?

groups: ["group1", "group2"...]? groups: "group1,group2,..."?

etc

How is group synching to be enabled?

julianlam commented 6 years ago

Hello @Steve-MP -- as the incoming payload (encoded in the JWT) is JSON, the proper format would be a simple array of strings containing group names, so your former example groups: ["group1", "group2"...] should be correct.

Let me know if the behaviour does not function as advertised :smile_cat: