mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-10-02 17:03:49 +01:00
f91ca71d40d44e8a36e17c6e22e7f7ea50d34958
Core answers 401 on the hassio_auth views when the caller is not the Supervisor user it knows about (its _check_access), which happens when the hassio config entry references a different Supervisor user than the one the socket auth middleware resolves. Supervisor so far treated that 401 like any other non-200: change_password reported "Username '...' does not exist. Check list of users using 'ha auth list'", and _backend_login logged "Unauthorized login" for the app's user and evicted the cached credentials. Both blame the wrong party: the user's credentials were never checked, and the cache eviction also breaks the offline login fallback for that user. Handle the 401 where it originates. make_request now raises the existing HomeAssistantAuthError when Core answers 401 over the Unix socket, or still answers 401 over TCP after the one token refresh it already performs. Previously the TCP case fell out of the retry loop without yielding, which asynccontextmanager turns into "generator didn't yield". HomeAssistantAuthError additionally becomes an APIError with status 500 and a stable error key, so it propagates through api_process with a message that points at Supervisor's own authentication instead of the requested username. The auth module re-raises it ahead of its generic HomeAssistantAPIError handling and leaves the cache untouched. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Home Assistant Supervisor
First private cloud solution for home automation
Home Assistant (former Hass.io) is a container-based system for managing your Home Assistant Core installation and related applications. The system is controlled via Home Assistant which communicates with the Supervisor. The Supervisor provides an API to manage the installation. This includes changing network settings or installing and updating software.
Installation
Installation instructions can be found at https://home-assistant.io/getting-started.
Development
For small changes and bugfixes you can just follow this, but for significant changes open a RFC first. Development instructions can be found here.
Release
Releases are done in 3 stages (channels) with this structure:
- Pull requests are merged to the
mainbranch. - A new build is pushed to the
devstage. - Releases are published.
- A new build is pushed to the
betastage. - The
stable.jsonfile is updated. - The build that was pushed to
betawill now be pushed tostable.
Languages
Python
96.3%
JavaScript
3.6%
