Base solution for your next web application
Open Closed

Account controller | External login Register username-MD5? #5265


User avatar
0
ashgadala created

Hi,

I noticed that you are md5'ing the username when the user register through the external login . Is there a reason why you are doing this ?

line 419 in account controller. model.UserName = model.EmailAddress.ToMd5();


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @ashgadala don't remember very well but I think it was related to length of UserName field. Value of email address is most of the time longer than 32 chars which is the length of username.

    Another thing might be this;

    Think that you are using same email both for Facebook and Twitter. So, if we use email address as username, you can only login with one of Facebook or Twitter because Username field is unique on users table.

  • User Avatar
    0
    ashgadala created

    I think in such case ideal thing would be merging the two accounts right?

  • User Avatar
    0
    ismcagdas created
    Support Team

    @ashgadala I haven't seen such an example on the internet before.