Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

More Graceful handling of existing usernames for user creation #1372

Closed
julianlam opened this issue Apr 11, 2014 · 7 comments
Closed

More Graceful handling of existing usernames for user creation #1372

julianlam opened this issue Apr 11, 2014 · 7 comments
Milestone

Comments

@julianlam
Copy link
Member

Right now when an SSO plugin tries to create a new user, it checks for an existing user, and rejects it if one exists.

Normally user registration handles this by not allowing the form to submit, but SSO is different.

Perhaps after the user is verified they can be taken to a separate page to choose a new username?

@a5mith
Copy link
Contributor

a5mith commented Apr 14, 2014

Two potential ideas here, either take them directly to the Edit Profile page when they're signed in so they can change their username and other info, or on return from the SSO allow them to change the username on a separate page, maybe an unnecessary step in the long run though.

As a sidenote it would be good if we could include something along the lines of if they registered using Twitter, ask politely for an email address, maybe via a tooltip similar to "You need to be logged in to do this" etc, something along the lines of "Please add an email address to your profile". Although forwarding straight to the profile edit may make a percentage of users fill it in automatically.

@julianlam
Copy link
Member Author

The difficult part is we can't risk having "bad" data being inserted into the database, e.g. SSO registration attempts to register a user with an existing username, so we insert the user as-is, and then redirect them to their profile to change it.

... but if somebody simply navigates away from that page, then the db is left in a state where two users have the same username 👎

Perhaps prior to registration, we can take them to a special page to fill out any "required" profile data*, username included if necessary.

* separate feature request, but perhaps we can kill two birds with one stone

@a5mith
Copy link
Contributor

a5mith commented Apr 14, 2014

It's probably a bit of a cheap hack, and may not even work, but how about if username already exists, append it with a random string, that way, even if that user does leave the page, it won't be a duplicate username. Their username will just look like a5mith215 or a5mith317 etc.

Definitely a tough one though. As the whole point of social registration is to not deal with forms. 👎

@julianlam
Copy link
Member Author

Hahha, yeah that was one potential "solution". IRC-style, name taken? You get your name + an underscore.

Would be an acceptable stop-gap solution.

@preeefix
Copy link
Contributor

You have to take a large scale style approach. I'm in favor for appending a number to the username, perhaps put a notification saying that "Your username is already taken. We added a number behind it but you chan change it on your Profile"

Using an underscore would bring in the issue of of multiple users using the same username. Ex:

  • Users 1, 2, 3, 4 all try to register with iamcardinal
  • User 1 gets iamcardinal
  • User 2 gets iamcardinal_
  • User 3 gets iamcardinal__
  • User 4 gets iamcardinal___

🐱

@a5mith
Copy link
Contributor

a5mith commented Apr 14, 2014

Using a single number, or predefined number would also cause the same issue, iamcardinal1, then iamcarinal11 etc, a random string would solve that, iamcardinal317, iamcardinal417 etc.

@preeefix
Copy link
Contributor

You can use increasing numbers, iamcardinal1, iamcardinal2, iamcardinal3...

@julianlam julianlam added this to the 0.4.2 milestone Apr 15, 2014
@julianlam julianlam changed the title More Graceful handling of existing usernames for user creation More Graceful handling of existing usernames for user creation Aug 21, 2014
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants