A user, Martin_Cash, reported an SSO authentication issue where members were repeatedly redirected to the “confirm your email address” page due to mismatched email casing between Discourse and their authentication server. The issue was resolved by downcasing the user’s email ID. codinghorror suggested ensuring code handles emails case-insensitively, and tgxworld confirmed that a unique index was added to prevent such issues. tgxworld further explained that regressions occurred during the implementation of multiple email support, where validations were incorrectly skipped, and noted that the fix is included in commit 0bc690ed. Users are encouraged to report if the problem reoccurs.
Today, I had a case of a member that would be redirected to the “confirm your email address” page every time they signed in to Discourse. They are able to sign in to other assets that use our authentication method just fine.
After some digging, we found that the email address stored in Discourse and on our authentication server had capital letters which they don’t actually type when signing in to anything. I had the member change their ID to lowercase and now they can sign in to Discourse without a problem.
I asked my authentication dude if I should send a ticket to him and he recommended i notify you guys as this “seems like a Discourse issue.”
@Martin_Cash There were some regressions we introduced when introducing multiple email address per user support. Usually all emails are downcased before being saved into the database but our code was incorrectly skipping validations. This should be resolved in