We are using Identity Server 4 for our user authentication.
I need to add a feature to restrict users from repeating one of their last 5 passwords.
To check the new password against their history, I think the best way is to (1 historic password at a time) use the historic salt to hash their new password, then compare the output.
I can get each historic salt from its hash, but I don't know how to
- use a specific salt for the hash
- generate the hash to compare against the historic one
I have checked the docs at http://docs.identityserver.io/en/release/ but I can't find anything relevent there.
Am I on the right track here? If so, how can I do the above? If not, how can I check that a new password hasn't been used before? (within the last 5 anyway)