Validates user-provided credentials against database entries. On successful login, returns on object with the validated credentials, returning an object with an error message otherwise.
Parameters
username: string
The provided username credential.
password: string
The provided password credential, hashed using the same algorithm used on insertion and compared with the hashed value in the database.
Validates user-provided credentials against database entries. On successful login, returns on object with the validated credentials, returning an object with an error message otherwise.