Aguafrommars / TheIdServer

OpenID/Connect, OAuth2, WS-Federation and SAML 2.0 server based on Duende IdentityServer and ITFoxtec Identity SAML 2.0 with its admin UI

Home Page:https://theidserver-duende.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement better password hashing

aguacongas opened this issue · comments

Better Password Hashing

using bcrypt extension, we can make the password hashing better as given below:

const inputPassword = req.body.password
const salt = await bcrypt.genSalt(10)
let securedPassword = await bcrypt.hash(inputPassword, salt) 

This leads to a high security of hidding the password by strong hashing of scrambled letters and numerics.
The genSalt is the cost of processing data whose default value is 10

Hi, thx to contribute.
The goal here is also to offer a way to choose the hash algorithm (Bcrypt, Argon2, Scrypt or PBKDF2). and to have a password migration.