zyonse / homebridge-dreo

Apple HomeKit integration for Dreo Smart Devices
https://www.npmjs.com/package/homebridge-dreo
Apache License 2.0
29 stars 17 forks source link

feat(auth): Improve authentication to fail with wrong password #33

Closed edabe closed 6 months ago

edabe commented 6 months ago

This change should improve the authentication handling to detect scenarios when the provided password is not valid, in which the API will return 200 and the following response payload:

{
    "code": 100022,
    "msg": "Incorrect account or password"
}

Another scenario is if the provided timestamp is not correct / accepted, in which the API will also return 200 and the following response payload:

{
    "code": 100030,
    "msg": "Your system clock is incorrect. Please set your clock to the current date and time."
}