diff --git a/app/wyzebridge/auth.py b/app/wyzebridge/auth.py index f021633e..9ec178c3 100644 --- a/app/wyzebridge/auth.py +++ b/app/wyzebridge/auth.py @@ -84,11 +84,14 @@ def _update_credentials(cls, email: str, force: bool = False) -> None: @classmethod def auth_onvif(cls, creds: Optional[dict]) -> bool: + if not cls.enabled: + return True + if creds and creds.get("username") == "wb": hashed = onvif_hash(creds["nonce"], creds["created"], cls.api) return hashed == creds.get("password") - return cls.enabled is False + return False def onvif_hash(nonce, created, password) -> str: