Nopenopenopenopenope!
This is terrible advice. Don't do this. Remember what happened when Adobe did this?
Nopenopenopenopenope!
This is terrible advice. Don't do this. Remember what happened when Adobe did this?
"When storing passwords, encrypt them first, using an existing, widely used crypto library. If you can get away with it, outsource identity management to Facebook / GitHub / Twitter / etc. and just use an OAuth flow."
Can you elaborate on what's so "nope" about that advice? Are you saying one shouldn't encrypt passwords?
If you use a batteries-included web-framework, this is already done for you. If you do not, you better understand the tradeoff of redeveloping those parts.
You should either store only the salted hash value, or outsource the identity management to a third party who knows not to store the users passwords. :)
This is something I've seen a lot of developers act elitist about, and it's always rubbed me the wrong way.
It's like the gun nuts that flip out when someone calls it an assault rifle or a clip instead of a magazine.
What can you do, people like showing off how "smart" they are.
And if you want the user to be able to perform sensitive operations (edit their personal details for example) then you'll have to ask for a OTP or email verification every time. These methods tend to be higher friction than a password box.
Sure you don't want to constantly bug the user but not every site needs to do that. Especially for sporadically-used sites, "receiving email" could be less of a pain than keeping track of passwords.
A session can be long-lived without being indefinite. We might decide that any authenticated site visit within the last week is new enough not to repeat the passwordless process, or we might say two weeks or a month or whatever.