| Is the question just "How many of you are rolling your own auth?" Because, if that's simply the extent of the question.... Well, I use npm's bcrypt + postgres DB of users (on an expressjs server, where I use knexjs for easy DB connection & use of JS logic in DB work). 1. Simply salt their PW when they create their account (which is simply a record in the DB) and store the salted version in the DB. 2. When they log in, salt the pw they entered during login and compare it with the salted one in the DB. It's not tough. Is it insanely secure? Nah, I am sure I am missing pieces involved in server and app security. But insanely stringent security doesn't matter for my purposes and use cases. Password salting... About 4 lines of code:
https://www.npmjs.com/package/bcrypt Storing salted password in DB... another few more lines of code depending on what you use. I'd say you can do this in under 10 lines of code. However, that is of course excluding the underlying system and other logic which hosts this process of salting, storing, and then on login, comparing. ...However, if the question is really more like
"How many of you are rolling your own auth which works in a high traffic, highly exposed situation, where expert levels of security are necessary?" then you'll likely encounter a different pattern of answers. |