PasswordVerify: Difference between revisions
Jump to navigation
Jump to search
Update Lua API reference |
Complete Lua function catalog |
||
| Line 39: | Line 39: | ||
* Verification runs on the bounded password worker service and does not block the server tick. | * Verification runs on the bounded password worker service and does not block the server tick. | ||
[[Category:Lua Functions]] | |||
[[Category:Server Functions]] | [[Category:Server Functions]] | ||
[[Category:Utility Functions]] | [[Category:Utility Functions]] | ||
Latest revision as of 09:54, 15 August 2026
passwordVerify
Queues an asynchronous Argon2id password verification operation.
Syntax
number|false passwordVerify(string password, string encodedHash, function callback)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
password |
string |
yes | The password candidate, from 1 to 256 bytes. |
encodedHash |
string |
yes | A valid encoded Argon2id hash previously produced by passwordHash.
|
callback |
function |
yes | Called as callback(success, matches, error).
|
Returns
Returns a numeric request identifier when queued, or false when validation, service availability, or queue limits reject the request.
Examples
Verify an account password:
passwordVerify(password, account.passwordHash, function(success, matches, errorMessage)
if success and matches then
outputDebugString("Password accepted")
elseif errorMessage then
outputDebugString(errorMessage)
end
end)
Notes
- Available only in server-side resource scripts.
- A successful request can still report
matches = falsefor an incorrect password. - Verification runs on the bounded password worker service and does not block the server tick.