Use salted bcrypt or another slow salted hashing algorithm. The goal is to make it expensive to crack. For reference, the GPU version of hashcat (cudahashcat or oclhashcat) is very popular, and look at these benchmarks to choose a hashing algorithm and to understand what to avoid like the plague:
https://gist.github.com/epixoip/c0b92196a33b902ec5f3
Clearly md5 is a no no and bcrypt and a few others are a huge improvement.
However, I feel compelled to add (and please don't flame me for this, just sharing reality) that even MD5 can actually be very hard to crack if your users use a long password (12 chars or above) and a large enough character set. In other words, using 12 char or more passwords with uppercase, lowercase, numbers and symbols is hard to crack even if they used a crappy algorithm like md5.
So the ideal combo is a strong hashing algo and enforcing complex long passwords.
And no, when you make the complexity super hard. I really dislike every website has a different complexity rule. Also, be aware that passphrase is a form of password. Instead of choosing "j2%25a^a2" as your password, you can choose a phrase you construct "hacker news is really awesome right buddy" (assuming the website cap at a reasonable length - allowing a long long password is a DOS vulnerability by itself). The pitfall of password/passphrase is reusing common password/passphrase which goes back to the first point - YES.
The real bummer is reusing your password and passphrase for every website. I have several sets of passwords. One set for financial/sensitive website for example.
https://hashcat.net/wiki/doku.php?id=mask_attack
So it's critically important to enforce length because short passwords will be cracked quickly even with slower hashing algorithms.
I've seen conflicting opinions about whether scrypt is better than bcrypt, but I haven't seen strong enough arguments to convince me to switch.
What would be considered as strong/good/secure password/authentication algorithms if one had to implement this today?
What would you recommend today as a good/secure authentication library that one can use with a micro framework like Python Flask (or others)? What about the authentication library in the batteries included Django framework?
What about recommended general authentication libraries for other web application frameworks such as Phoenix/Elixir, Node based, Go based, etc?
Here are some links from OWASP/Google that offers some details:
https://www.owasp.org/index.php/Cryptographic_Storage_Cheat_...
https://www.owasp.org/index.php/Password_Storage_Cheat_Sheet
https://docs.google.com/document/d/1R6c9NW6wtoEoT3CS4UVmthw1...