fix: make username queries case fixes (#223) - #236
Open
KavinRaj117 wants to merge 3 commits into
Open
KavinRaj117 wants to merge 3 commits into
KavinRaj117 wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ZeyadAbbas
approved these changes
Sep 22, 2026
ZeyadAbbas
requested changes
Sep 22, 2026
ZeyadAbbas
left a comment
Contributor
There was a problem hiding this comment.
Could you please make these changes:
- Convert the username input to lowercase as the user types, including when Caps Lock is enabled. So the input should only show lowercase.
- On the server, convert the username to lowercase before checking availability and saving it.
- Check for an existing username using
eqafter normalization like before, rather thanilike. - Allow letters, numbers, hyphens, underscores, and dots.
This ensures frontend validation cannot be bypassed and usernames are always stored consistently in lowercase.
Contributor
Author
|
Hey @ZeyadAbbas, I've updated the PR to force lowercase input on the frontend as the user types, updated the schema to allow dots, normalized server inputs with .toLowerCase(), and switched the queries back to eq |
Contributor
|
@KavinRaj117 Perhaps you forgot to commit, but I do not see these changes |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #223. Updates usernameSchema to transform usernames to lowercase on input, and changes eq checks to case insensitive ilike queries in the userMetadataRouter.
Tested it locally by checking the case sensitive usernames and updates ( although im not sure it will work a 100 percent tho)