What is the best practice to check user by login and password? I know two ways, but could not choose most security and right way.
-
Check in sql like
where login = @login and password = @passwordwith using stored procedure -
Firstly select user by login and after do password check in code. (C#)
Also what is official standard to check password strength?
Go for first way only
check the user and password in database side procedure only.
Modification to this first encrypt and store encrypted the password store it in database when creating user.
than when checking for user login, comapre this encrypted password only , by seding encrypted password as parameter to the proceudre …
For password stength
Try using googles Google Password Strength API http://www.codeproject.com/KB/ajax/GooglePasswordStrength.aspx