Skip to content

feat(auth): normalize emails to lower case - #333

Merged
DennisBauer merged 1 commit into
mainfrom
feat/email-lowercase
Aug 4, 2026
Merged

feat(auth): normalize emails to lower case#333
DennisBauer merged 1 commit into
mainfrom
feat/email-lowercase

Conversation

@DennisBauer

Copy link
Copy Markdown
Contributor

Mail hosts treat addresses case-insensitively, but the app sent them verbatim, so an account registered as "Max@Web.DE" failed to sign in as "max@web.de".

Fold email fields as the user types via EmailInputTransformation, so the field shows what will be sent, and pair it with KeyboardCapitalization.None so the keyboard stops fighting it. The transformation replaces per character rather than lower-casing the whole buffer, keeping length and cursor stable.

Text that never passes through the field — prefilled values, autofill — needs the same treatment, so every read that reaches EmailValidator or the network goes through normalizeEmail(), which also absorbs the trim() calls it replaces. Covers login, register, forgot password, re-auth, change email and guest upgrade.

Mail hosts treat addresses case-insensitively, but the app sent them
verbatim, so an account registered as "Max@Web.DE" failed to sign in as
"max@web.de".

Fold email fields as the user types via EmailInputTransformation, so the
field shows what will be sent, and pair it with KeyboardCapitalization.None
so the keyboard stops fighting it. The transformation replaces per character
rather than lower-casing the whole buffer, keeping length and cursor stable.

Text that never passes through the field — prefilled values, autofill — needs
the same treatment, so every read that reaches EmailValidator or the network
goes through normalizeEmail(), which also absorbs the trim() calls it
replaces. Covers login, register, forgot password, re-auth, change email and
guest upgrade.
@DennisBauer DennisBauer added bug Something isn't working feature New feature or request and removed bug Something isn't working labels Aug 4, 2026
@DennisBauer
DennisBauer enabled auto-merge August 4, 2026 15:00
@DennisBauer
DennisBauer merged commit a38a1e1 into main Aug 4, 2026
3 checks passed
@DennisBauer
DennisBauer deleted the feat/email-lowercase branch August 4, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant