fave77/pbchess

Duplicate users are created during OAuth

Closed this issue ยท 0 comments

Describe the bug ๐Ÿ›

Suppose a username is already taken, a new user with the name same as the username registers using OAuth, there would be two users, with the same username.

To Reproduce ๐Ÿ”
Steps to reproduce the behavior:

Register a user with a username say bob. Now if a second person with the email bob@gmail.com is registering, there would be two users with the username bob.

Expected behaviour ๐Ÿ

If the person with the email bob@gmail.com is registering then :

  1. Check if the username bob is taken.
  2. If the username bob is taken, add few random numbers at the end of the username say bob23456 and register the username.
  3. If the username is not taken, we can simply use bob.