The worst case scenario I’m aware of requires these conditions:
- email addresses are not verified on the external site
require_activation=trueis not set in the SSO payload- there are existing accounts on the Discourse site that do not have a
SingleSignOnRecordassociated with them (the account owner has never logged into Discourse with SSO)
For that case, someone could signup on the external site using the email address of a Discourse user who has never signed in with SSO. This would allow the unverified account from the external site to take over the Discourse account that uses the same email address. This would be especially concerning if it was an admin account on Discourse.
It is recommended that Discourse handles email verification if the external site isn’t handling it:
There are a couple of reasons that it’s better to handle email verification on the external site though:
- forcing users to receive the confirmation email from Discourse adds some friction when users first attempt to login to Discourse. (Realistically, that friction has to happen somewhere though - either on the Discourse end or on the external site’s end.)
- Discourse won’t match existing Discourse accounts to external logins based on the email address if
require_activationis set totruein the SSO payload. This is an issue if you enable DiscourseConnect after some accounts have been created on Discourse by registering with a username/password. It’s also an issue if for any reason you ever need to deleteSingleSignOnRecordentries on Discourse. Discourse won’t automatically create newSingleSignOnRecordentries when users attempt to log back into Discourse.