Behavior delta to decide on
POST /auth/wxyc/station-signup normalizes the username to lowercase at the top of the handler (correctly — better-auth's username plugin lowercases on store and duplicate-checks the lowercased value, and the raw-case pre-check was a burned-use 500 bug). But provisionUser passes that normalized value to internalAdapter.createUser, and better-auth's create hook sets display_username from whatever it is handed. So a DJ signing up as DJ_Awesome gets display_username = 'dj_awesome', whereas better-auth's own /sign-up/email preserves the caller's casing in display_username while lowercasing username.
Purely cosmetic, but it is a real delta from both better-auth's native behavior and this endpoint's first revision.
The question
Does display casing matter anywhere dj-site shows a username? If yes, the fix is small: thread the raw (pre-normalization) value through provisionUser as an explicit displayUsername so login stays case-insensitive while display preserves what the DJ typed. If no, close this and the lowercased display name is the documented behavior.
Related
Fallout noted in the #2375 review. dj-site#1352 (the signup form) is the surface where the answer shows.
Behavior delta to decide on
POST /auth/wxyc/station-signupnormalizes the username to lowercase at the top of the handler (correctly — better-auth'susernameplugin lowercases on store and duplicate-checks the lowercased value, and the raw-case pre-check was a burned-use 500 bug). ButprovisionUserpasses that normalized value tointernalAdapter.createUser, and better-auth's create hook setsdisplay_usernamefrom whatever it is handed. So a DJ signing up asDJ_Awesomegetsdisplay_username = 'dj_awesome', whereas better-auth's own/sign-up/emailpreserves the caller's casing indisplay_usernamewhile lowercasingusername.Purely cosmetic, but it is a real delta from both better-auth's native behavior and this endpoint's first revision.
The question
Does display casing matter anywhere dj-site shows a username? If yes, the fix is small: thread the raw (pre-normalization) value through
provisionUseras an explicitdisplayUsernameso login stays case-insensitive while display preserves what the DJ typed. If no, close this and the lowercased display name is the documented behavior.Related
Fallout noted in the #2375 review. dj-site#1352 (the signup form) is the surface where the answer shows.