Hacker News new | ask | show | jobs
by oytis 193 days ago
Your email is your identity. If they allow you to change your email, what they should refer you by, your passport number? Was kind of easier in the times of usernames, but these are long gone
3 comments

They should use the integer primary key of the users table, of course.
Nah, that’s too 1985.

Because client doesn’t know it, inserts can be slow in cross-db environment.

Guid is always better (can be client generated), and modern guid versions can be ordered chronologically

That's probably an implementation feature that is hidden and not dependable if it exists at all.
Please enter your integer primary key and password to log in.
You can use a random numerical ID as PK and let people associate as many authn IDs as they want after logging in with one.
Who in this scenario outlines the key infrastructure, and how is the private key maintained?
Why would you allow this complexity for basically nothing?
Using a separate table for authn is a basic pattern for this problem. What would you do?
Most services I know allow changing both.