Skip to content

Blink integration: hardware_id "Home Assistant" is rejected by OAuth v2 authorize endpoint, blocking all logins #177284

Description

@Pierre784

The problem

The problem

The Blink integration fails to authenticate with the error "Invalid authentication"
for every user, immediately after entering username/password — before the 2FA step
is ever reached.

Root cause

HARDWARE_ID in homeassistant/components/blink/const.py is set to the literal
string "Home Assistant":

HARDWARE_ID = "Home Assistant"

The Blink OAuth v2 authorize endpoint (blinkpy/api.py, function
oauth_authorize_request) expects hardware_id to be a UUID, as documented in its
own docstring:

async def oauth_authorize_request(auth, hardware_id, code_challenge):
    """
    Step 1: Initial authorization request.

    Args:
        auth: Auth instance
        hardware_id: Device hardware ID (UUID)
        ...
    """

Sending a non-UUID string causes the authorize request to be rejected by Blink's
servers, and blinkpy swallows the real error, only logging a generic
"OAuth authorization request failed" with no HTTP status or body. This makes the
config flow immediately raise InvalidAuth, so the user always sees "Invalid
authentication" and never reaches the 2FA / PIN step.

What version of Home Assistant Core has the issue?

core-2026.7.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

Reproduction / diagnosis

Running blinkpy directly inside the HA Core container:

blink.auth = Auth(
    {"username": "...", "password": "...", "hardware_id": "Home Assistant"},
    no_prompt=True,
    session=session
)
await blink.start()
# -> ERROR blinkpy.auth: OAuth authorization request failed

Replacing hardware_id with a valid UUID with the exact same credentials:

blink.auth = Auth(
    {"username": "...", "password": "...", "hardware_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"},
    no_prompt=True,
    session=session
)
await blink.start()
# -> blinkpy.auth.BlinkTwoFARequiredError (expected — login succeeded, 2FA required)

This confirms the credentials and the OAuth v2 / 2FA handling code in both blinkpy
and config_flow.py are correct — the only issue is the non-UUID HARDWARE_ID
constant.

Suggested fix

Generate/store a stable UUID (e.g. via uuid.uuid4(), persisted once per install)
instead of the hardcoded string "Home Assistant" in
homeassistant/components/blink/const.py.

Environment

  • Home Assistant Core: 2026.7.2
  • Installation method: Home Assistant OS
  • Supervisor: 2026.07.3
  • Operating System: 18.1
  • blinkpy version: 0.25.6
  • Integration: Blink

Workaround currently in use

Manually patching const.py inside the container to use a UUID instead of
"Home Assistant":

sed -i 's/HARDWARE_ID = "Home Assistant"/HARDWARE_ID = "<some-uuid>"/' \
  /usr/src/homeassistant/homeassistant/components/blink/const.py

This works but is overwritten on every Core update that touches this file.

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

Suggested fix

Generate/store a stable UUID (e.g. via uuid.uuid4(), persisted once per install)
instead of the hardcoded string "Home Assistant" in
homeassistant/components/blink/const.py.

Environment

  • Home Assistant Core: 2026.7.2
  • Installation method: Home Assistant OS
  • Supervisor: 2026.07.3
  • Operating System: 18.1
  • blinkpy version: 0.25.6
  • Integration: Blink

Workaround currently in use

Manually patching const.py inside the container to use a UUID instead of
"Home Assistant":

sed -i 's/HARDWARE_ID = "Home Assistant"/HARDWARE_ID = "<some-uuid>"/' \
  /usr/src/homeassistant/homeassistant/components/blink/const.py

This works but is overwritten on every Core update that touches this file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions