SSO with non-unique email addresses?

Is it possible to use Discourse with SSO and email addresses which are not unique?
That means users have multiple accounts with different usernames but same email addresses.

No, emails are unique identifiers for users in Discourse and this is fundamental to all identity in the system.

A work around for many people is to use +addressing, like user+joe@gmail.com, user+pat@gmail.com, and so on. O all email providers support that, but most do.

@pfaffman how exactly is that going to help them there? By disambiguating? That is true, when you have

user@example.com

you could change it to

user+secondary@example.com1

It’s often useful to have multiple accounts, and using +addressing lets you do that without creating multiple email
Addresses.

User+whatever@gmail.com will get delivered to user@gmail.com. User@gmail.com1 won’t let them create an account.

Oh, but SSO was the point of this thread, so it’s not clear that my solution will help here. They’d still need to make every email address unique, one way or another.

この話題に乗り遅れてしまいましたが、独自 SSO システム(Google や GitHub などではないもの)を使用している場合、ユーザーのメールアドレスを使用し、@ の直前に +username を挿入する計画です。

誰かのお役に立てれば幸いです。これが現在の計画です。

しかし、SSO ではどのように機能するのでしょうか?

当社は独自の Discourse SSO プロバイダーを実装しています。つまり、そのシステムは、Discourse に一意のメールアドレスを送信するように調整可能です(例:user@gmail.comuser+internal_id@gmail.com に置換されます)。ユーザーがログインする際、ユーザー名で当社の SSO システムにログインするため、この仕組みはユーザーには見えません。

最終的には、すべてのユーザーにメールが配信されるわけではないため、この方法は完璧ではありませんが、メールが一意でないシステムにおいて、実際のメールの衝突を回避することができます。(残念ながら、私が現在作業している特定のアプリは Discourse よりもユーザー名の制限が緩いため、衝突の可能性はありますが、現時点では非常に低いと考えられます。)

長期的には、別の通知用メールアドレスを保存するプラグインを導入し、SSO 側から一意(場合によっては架空?)のメールアドレスと、一意である必要のない通知用メールアドレスを送信するのが最善の解決策ではないかと考えています。これでシステムに重大な支障をきたすかどうかは現時点では不明ですが、コードを約 30 分ざっと確認した限り、痛みを伴う解決策ではないにせよ、実現可能である可能性が高いと思われます。