Skip to content

Alx/fea/be/login w username#201

Merged
alx-sch merged 7 commits intomainfrom
alx/fea/be/login-w-username
Mar 19, 2026
Merged

Alx/fea/be/login w username#201
alx-sch merged 7 commits intomainfrom
alx/fea/be/login-w-username

Conversation

@alx-sch
Copy link
Copy Markdown
Owner

@alx-sch alx-sch commented Mar 19, 2026

  • Restrict allowed characters for usernames (no whitespace, emojis, or special characters) to prevent breaking the username-slug endpoint @dovy-mus is working on.
  • The original name the user chooses is now saved in a new displayName column, while the name column stores a normalized, all-lowercase version.
  • Users can now log in using their username, and the input is case-insensitive (alice, Alice, and aLiCe all work).

@alx-sch alx-sch marked this pull request as ready for review March 19, 2026 12:29
@alx-sch
Copy link
Copy Markdown
Owner Author

alx-sch commented Mar 19, 2026

the displayName (e.g. aLiCe)(as provided by the user during registration) should show everywhere BUT in the admin dashboard (it wasn't readily available in the schemas there --- but that's quite alright to have the normalized usernames there, I guess (e.g. alice).

- Generate nanoid once per attempt so name and displayName share the same suffix
- Add migration to lowercase existing names and backfill null displayNames
- Clarify username field label and placeholder in ProfileInfo
@dovy-mus
Copy link
Copy Markdown
Collaborator

I made a new migration that should backfill existing users' names and displayNames in prod -> hopefully works. Also there were a tiny issue with generateNanoid used for the google oauth users it was called 2 times resulting in different displayName and name - now it should be alright

@alx-sch alx-sch merged commit b66bce1 into main Mar 19, 2026
4 checks passed
@alx-sch alx-sch deleted the alx/fea/be/login-w-username branch March 19, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants