diff --git a/README.md b/README.md index 4804ab29..45b8d9a6 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,9 @@ You can then use the web interface at `http://localhost:5000` where localhost is See [basic usage](#basic-usage) for additional information or visit the [wiki page](https://github.com/mrlt8/docker-wyze-bridge/wiki/Home-Assistant) for additional information on using the bridge as a Home Assistant Add-on. -## What's Changed in v2.10.0 +## What's Changed in v2.10.0/v2.10.1 + +FIXED: Could not disable `WB_AUTH` if `WB_API` is set. (#1304) ### WebUI Authentication diff --git a/app/wyzebridge/auth.py b/app/wyzebridge/auth.py index a948239c..b4de82f2 100644 --- a/app/wyzebridge/auth.py +++ b/app/wyzebridge/auth.py @@ -47,7 +47,7 @@ def gen_api_key(email): class WbAuth: enabled: bool = bool(env_bool("WB_AUTH") if os.getenv("WB_AUTH") else True) username: str = get_secret("wb_username", "wbadmin") - api: str = get_credential("wb_api") + api: str = "" _pass: str = get_credential("wb_password") _hashed_pass: Optional[str] = None @@ -80,8 +80,7 @@ def _update_credentials(cls, email: str, force: bool = False) -> None: cls._pass = email.partition("@")[0] cls._hashed_pass = generate_password_hash(cls._pass) - if not get_credential("wb_api"): - cls.api = gen_api_key(email) + cls.api = get_credential("wb_api") or gen_api_key(email) STREAM_AUTH: str = env_bool("STREAM_AUTH", style="original") diff --git a/home_assistant/CHANGELOG.md b/home_assistant/CHANGELOG.md index 1a929533..68de8a14 100644 --- a/home_assistant/CHANGELOG.md +++ b/home_assistant/CHANGELOG.md @@ -1,4 +1,6 @@ -## What's Changed in v2.10.0 +## What's Changed in v2.10.0/v2.10.1 + +FIXED: Could not disable `WB_AUTH` if `WB_API` is set. Thanks @bengthu! (#1304) ### WebUI Authentication