Skip to content

[BUG] get_login_info fails: SSO page now uses single-quoted assignments #176

Closed

Description

@jck-longhair

Describe the bug
Since 20 Oct 2026, https://sso.hivehome.com/ writes its config as
window.HiveSSOPoolId = 'eu-west-1_…'; (spaces around =, single quotes) instead of
window.HiveSSOPoolId="…",. Login info can no longer be parsed, so every setup fails
before authentication. Reauth/2FA can't help.

  • Released 1.0.9 (pinned by Home Assistant): the find-and-replace JSON build fails with
    Failed to get login info: Expecting value: line 1 column 20 (char 19), then
    AttributeError: 'NoneType' object has no attribute 'get' at
    hive_auth_async.py self.__pool_id = self.data.get("UPID").
  • dev (2.0.0 betas): _SSO_ASSIGNMENT only matches double-quoted values, so
    get_login_info() hits a KeyError and returns None. Same outcome.

Expected behavior
get_login_info() parses HiveSSOPoolId and HiveSSOPublicCognitoClientId in either format.

Additional context
Fix: allow either quote in _SSO_ASSIGNMENT:
re.compile(r"""window\.(\w+)\s*=\s*["']([^"']*)["']""")
Tested against the live page and with a new unit test; full suite and pre-commit pass.
I'll open a PR against dev. Home Assistant would also need a release and a version bump.
A hot-patched 1.0.9 is working on HA Core 2026.10 (Python 3.14).

Activity

  1. KJonline commented on Oct 20, 2026

    @KJonline
    Contributor

    Thanks for raising the bug issue fixed in PR #169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions