passport-local-sequelize icon indicating copy to clipboard operation
passport-local-sequelize copied to clipboard

Why use "username" as identity field and not the "id"?

Open rafis opened this issue 8 years ago • 1 comments

Why you use "username" as identity field, while most auth engines I have encountered in PHP uses used_id as identity?

rafis avatar Nov 06 '16 09:11 rafis

by default, this module uses id as the primary key. see https://github.com/madhurjain/passport-local-sequelize/blob/3871eaaf72df031db1f5c49633a2df25feae79d8/lib/passport-local-sequelize.js#L35-L39

username is just a normal field. if PHP uses id as a username, it's very very incorrect. i have enough trouble remembering my ICQ number.

kennethklee avatar Jan 29 '17 20:01 kennethklee