SSO مع عناوين بريد إلكتروني غير فريدة؟

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)؟

نحن ننفّذ مزوّد SSO الخاص بنا لـ Discourse — لذا، يمكن تكييف هذا النظام لإرسال بريد إلكتروني فريد إلى Discourse. (على سبيل المثال، يتم استبدال user@gmail.com بـ user+internal_id@gmail.com). عندما يسجل المستخدم دخوله، لا يرى أيًا من ذلك، حيث يسجل دخوله إلى نظام SSO الخاص بنا باستخدام اسم المستخدم الخاص به.

في النهاية، هذا الحل ليس مثاليًا، لأنه لا يضمن تسليم رسائل البريد الإلكتروني للجميع، لكنه يتجنب التصادمات الحقيقية في عناوين البريد الإلكتروني عندما تكون لديك أنظمة لا تكون فيها عناوين البريد الإلكتروني فريدة. (للأسف، التطبيق المحدد الذي أعمل عليه يحتوي أيضًا على قيود أقل على أسماء المستخدمين مقارنة بـ Discourse، مما يجعل التصادمات ممكنة، رغم أنها غير محتملة حتى الآن).

أعتقد أن أفضل حل على المدى الطويل قد يكون وجود إضافة تخزن عنوان بريد إلكتروني منفصل خاص بالإشعارات، وتقوم إضافة SSO بإرسال عنوان بريد إلكتروني فريد (قد يكون مزيفًا حتى؟) وعنوان آخر للإشعارات لا يشترط أن يكون فريدًا. لست متأكدًا بعد مما إذا كان ذلك سيكسر الأمور بشكل جدي، لكن حوالي 30 دقيقة من استعراض الكود تشير إلى أنه حل ممكن، وإن لم يكن خاليًا من الألم.