Zcraks Posted July 30, 2019 Share Posted July 30, 2019 -- [register] local passwordHash = passwordHash(password,"bcrypt",{}) if (passwordHash) then ... -- [login] outputDebugString(password) -- true outputDebugString(passwordHash) -- true if (passwordVerify(password, passwordHash)) then ... else outputDebugString("Account not found") end -- Why is the password still does not match ? Link to comment
JeViCo Posted July 31, 2019 Share Posted July 31, 2019 @Zcraks you can replace passwordVerify function by comparing two hashes, for example: register: local hashedPassword = passwordHash("your_password","bcrypt",{}) setAccountData(account, "hash_password", hashedPassword) -- save it login: local currentHashedPassword = passwordHash("i_have_recently_typed_it","bcrypt",{}) local originalHashedPassword = getAccountData(account, "hash_password") if (currentHashedPassword == originalHashedPassword) then -- do something end I guess something wrong with your variables or case sensetivity in your password Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now