Skip to content

Commit 14ea80a

Browse files
committed
Ignore WB_API if WB_AUTH is disabled #1304
1 parent 9f8c7df commit 14ea80a

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ You can then use the web interface at `http://localhost:5000` where localhost is
5959

6060
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.
6161

62-
## What's Changed in v2.10.0
62+
## What's Changed in v2.10.0/v2.10.1
63+
64+
FIXED: Could not disable `WB_AUTH` if `WB_API` is set. (#1304)
6365

6466
### WebUI Authentication
6567

app/wyzebridge/auth.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def gen_api_key(email):
4747
class WbAuth:
4848
enabled: bool = bool(env_bool("WB_AUTH") if os.getenv("WB_AUTH") else True)
4949
username: str = get_secret("wb_username", "wbadmin")
50-
api: str = get_credential("wb_api")
50+
api: str = ""
5151
_pass: str = get_credential("wb_password")
5252
_hashed_pass: Optional[str] = None
5353

@@ -80,8 +80,7 @@ def _update_credentials(cls, email: str, force: bool = False) -> None:
8080
cls._pass = email.partition("@")[0]
8181
cls._hashed_pass = generate_password_hash(cls._pass)
8282

83-
if not get_credential("wb_api"):
84-
cls.api = gen_api_key(email)
83+
cls.api = get_credential("wb_api") or gen_api_key(email)
8584

8685

8786
STREAM_AUTH: str = env_bool("STREAM_AUTH", style="original")

home_assistant/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
## What's Changed in v2.10.0
1+
## What's Changed in v2.10.0/v2.10.1
2+
3+
FIXED: Could not disable `WB_AUTH` if `WB_API` is set. Thanks @bengthu! (#1304)
24

35
### WebUI Authentication
46

0 commit comments

Comments
 (0)