Invitations should be compatible with SSO

@sam What do you think about this idea? Is it something that’s likely to be added?

We just started our community and are rolling out to a number of different audiences in stages. The first audience is general and doesn’t need to be added to any groups, but our next audience will be a specific group that should get special treatment.

Allowing groups to be specified via SSO is fine, my pref would be for 2 keys

groups: [group1,group2,group3]
remove_groups: [remove1]

That should allow you full fidelity here, should be fairly straightforward to add. We can slot it for 1.7

3 „Gefällt mir“

Glad to hear this is something you can support.

The only issue I see with having a remove_groups flag is that I will need to know what groups the user is no longer a member of to remove them. What about supporting three keys:

groups: [group1,group2,group3] # ensure user is only in groups1, group2, and group3

or

add_groups: [group4] # ensure user is in group4
remove_groups: [group2] # ensure user is not in group2

This way, my main app can handle all the logic and Discourse will simply be kept in sync.

4 „Gefällt mir“

I think the only way that works is the second one, because otherwise the membership of any group you create through the Discourse UI will have its members removed as they re-log.

The remove groups parameter would then be managed_group_list - user.groups (inventing the terminology of a “sso-managed group” for the sake of this post).

We can revisit that design if the managed groups list gets too big.

That’s the desired behavior for me. I don’t want people managing user groups in the discourse admin. I want our main app to have full control of group memberships.

1 „Gefällt mir“

This is now completed per:

8 „Gefällt mir“

Sorry to re-open this, but I’m trying to make sure I understand what was (or wasn’t) done to solve the use cases presented earlier.

I’m also on SSO. With a Discourse hosted site. We want to have a private forum where we can invite people select people, but unfortunately it’s not tied to a parameter we can identify and pass via SSO.

We want to upload a list of email addresses that, if/when a user signs in for the first time they are auto-added to the group. We are using the domain solution for some groups, but that wouldn’t apply in this case.

It looks like this was discussed, but it’s unclear to me which solution was ultimately chosen. I tested with an email address that was registered in our main userbase, but hadn’t logged into our discourse site to initiate the SSO. When we logged in with that ID the account created but he’s not in the group.

1 „Gefällt mir“

So habe ich herausgefunden, wie man SSO-Benutzer basierend auf einer Liste von E-Mail-Adressen vorab einer Gruppe hinzufügt:

  1. Senden Sie eine private Nachricht, indem Sie die E-Mail-Adressen in das Feld für Empfänger einfügen (seit August 2017 unterstützt siehe hier), um „gestaffelte
3 „Gefällt mir“

@RyanK / @tobiaseigen Ich bin ziemlich sicher, dass dies gut geschlossen werden kann. Einladungen sollten jetzt super mit SSO kompatibel sein. Wir haben in den letzten 2 Jahren enorme Fortschritte gemacht und sollten Ihren Anwendungsfall nativ unterstützen können.

2 „Gefällt mir“

Ja, ich denke, wir können das abschließen. Es ist tatsächlich sehr gut möglich, Leute einzuladen, die sich dann über SSO oder eine andere vom System bereitgestellte Anmeldemethode anmelden. Je nachdem, wie die Einladung eingerichtet ist, kann der eingeladene Benutzer beim Anmelden zu Gruppen hinzugefügt und in ein bestimmtes Thema eingefügt werden. Ziemlich cool! :ice_cream:

Die meiste Diskussion hier dreht sich tatsächlich um SSO-Unterstützung für das Hinzufügen und Entfernen eines Benutzers zu Gruppen, womit ich mich weniger auskenne und hier auf Meta nicht viel Dokumentation dazu finde. Jemand, der sich besser auskennt, könnte eine FAQ dazu schreiben, um das Bekannte zusammenzufassen. Es ermöglicht, Benutzer zu Gruppen hinzuzufügen oder daraus zu entfernen, wenn sie sich über SSO anmelden, was eigentlich nichts mit dem Einladungssystem zu tun hat.

Dies ist ein gutes Beispiel von @simon, wie man es mit WordPress macht: Automatically Adding New Users (from WP integration) To A Group - #4 by simon

Es gibt jedoch Vorbehalte, daher ist es vielleicht nicht ratsam, Leute zu ermutigen, diese Methode zu implementieren. Die Discourse-Gruppen müssen bereits existieren, damit dies funktioniert, und es erfordert, dass der Benutzer sich abmeldet und wieder anmeldet, damit Änderungen auf der Seite des Authentifizierungsanbieters wirksam werden.

2 „Gefällt mir“