Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

properly normalize username and email#36

Merged
ValJed merged 2 commits intomainfrom
pro-8285-login-case-insensitive
Oct 23, 2025
Merged

properly normalize username and email#36
ValJed merged 2 commits intomainfrom
pro-8285-login-case-insensitive

Conversation

@ValJed
Copy link
Copy Markdown
Contributor

@ValJed ValJed commented Oct 14, 2025

See ticket and core PR

⚠️ One think to have in mind. If the account provider (let's say github) is case senstive, making it insensitive in apos could result in different users from the provider not being able to log in apos using passport-bridge.
Which could be frustrating and hard to understand for users.

@linear
Copy link
Copy Markdown

linear bot commented Oct 14, 2025

@ValJed ValJed self-assigned this Oct 14, 2025
@ValJed ValJed marked this pull request as draft October 14, 2025 16:19
// Try hard to come up with a title, as without a slug we'll get an error
// at insert time
user.title = profile.displayName || profile.username || user.email || '';
user.title = profile.displayName || profile.username || email || '';
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uses non normlized email for title.

return { email };
return {
email: self.apos.login.normalizeLoginName(email)
};
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

normalize in criteria to retrieve the user based on apps user info.

@ValJed ValJed marked this pull request as ready for review October 16, 2025 07:00
@ValJed ValJed requested a review from boutell October 16, 2025 07:00
Copy link
Copy Markdown
Member

@boutell boutell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think this makes sense, if you have set the system to case insensitive and you use a case-sensitive identity provider and that leads to a conflict, then you'll get an error, and that's a GOOD thing (it points out a real conflict that has to be addressed by the developer)

@ValJed ValJed merged commit 3bf3cf3 into main Oct 23, 2025
12 checks passed
@ValJed ValJed deleted the pro-8285-login-case-insensitive branch October 23, 2025 14:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants