Closed joe1chen closed 9 years ago
Hi @joe1chen -- is there a need for a shortid to be generated? NodeBB's usernames can handle spaces, so I see no reason to force the user to pick a new username.
Hi @julianlam, my understanding was that username needs to be unique in NodeBB. So if 2 different users with the handle "John Smith" login with the social login (Google, Facebook, etc.) then the second one will result in a username collision and then the login fails.
I think I ran into this issue just by testing my various social logins. With these social logins, I didn't see any error recovery mechanism for when an error occurs. Ideally they would be redirected to the registration page with their email pre-filled, and then asked to select a new username.
If two users register with the same display name, NodeBB will automatically append a string of numbers to the end of the duplicate user upon creation.
Is that no longer happening?
For some reason I did not see this behavior. Or maybe there was something else causing a login error.
Is it possible that the strings were being appended but the resulting username exceeded the max length for usernames?
In any case, I will try to retest and see if I can determine the exact error.
Using the handle as username is problematic since handle can be something like "John Smith". Instead set the fullname of the user to the handle and generate a random username.