superlogin icon indicating copy to clipboard operation
superlogin copied to clipboard

Separate username/email from userDoc _id

Open peteruithoven opened this issue 7 years ago • 5 comments

As far as I understand it superlogin uses usernames as _id's in the userDB.

  • It looks like the username is validated using a regexp (/^[a-z0-9_-]{3,16}$/), this means we limit the userid's based on what couchdb can handle as _id's?
  • Doesn't this make it harder / impossible to change usernames later on? (While there are methods to change the E-mail and password there is no change username method)

When enabling the emailUsername the E-mail is used as _id. Which solves the uncommon characters issue, but doesn't make changing it easier.

It looks like Hoodie for example separated the username from the id. https://github.com/hoodiehq/hoodie-account-client#accountid

Wouldn't it be safer / more extensible to separate the _id from the username/email?

peteruithoven avatar Nov 23 '16 12:11 peteruithoven