home-assistant/core · error · ConfigEntryAuthFailed
Authentication failed: {reauth_err}
Error message
Authentication failed: {reauth_err} What it means
Raised as ConfigEntryAuthFailed by the Autoskope DataUpdateCoordinator when a periodic get_vehicles() call got InvalidAuth AND a re-authentication attempt with the stored credentials also raised InvalidAuth. It tells Home Assistant the stored credentials are permanently bad and the user must re-authenticate; the coordinator stops retrying.
Source
Thrown at homeassistant/components/autoskope/coordinator.py:55
)
self.api = api
@override
async def _async_update_data(self) -> dict[str, Vehicle]:
"""Fetch data from API endpoint."""
try:
vehicles = await self.api.get_vehicles()
return {vehicle.id: vehicle for vehicle in vehicles}
except InvalidAuth:
# Attempt to re-authenticate using stored credentials
try:
await self.api.authenticate()
# Retry the request after successful re-authentication
vehicles = await self.api.get_vehicles()
return {vehicle.id: vehicle for vehicle in vehicles}
except InvalidAuth as reauth_err:
raise ConfigEntryAuthFailed(
f"Authentication failed: {reauth_err}"
) from reauth_err
except CannotConnect as err:
raise UpdateFailed(f"Error communicating with API: {err}") from err
View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Complete the re-auth flow triggered by this error and update the password.
- Confirm the credentials still work in the official Autoskope app.
- If credentials are correct, update the Autoskope integration/library in case the auth endpoint changed.
Defensive patterns
Strategy: try-catch
Try / catch
from homeassistant.exceptions import ConfigEntryAuthFailed
try:
data = await coordinator.async_refresh()
except ConfigEntryAuthFailed:
# stored credentials are dead; direct the user to the re-auth flow and stop refreshing
start_reauth_flow(entry) Prevention
- Update the stored password in HA as part of any credential rotation.
- Never swallow ConfigEntryAuthFailed in coordinator subclasses — it must reach the config entry machinery.
- Log the reauth_err detail; it often distinguishes bad credentials from API changes.
When it happens
Trigger: Sequence: get_vehicles() -> InvalidAuth (session/token expired), then api.authenticate() with entry.data credentials -> InvalidAuth again. Typical when the password was changed server-side after initial setup, so stored credentials can no longer obtain a session.
Common situations: Password rotated outside Home Assistant; account suspended; API changed its auth scheme in a library update; credentials truncated/whitespace-corrupted in config entry data.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
Related errors
- api_authentication_error
- Authentication failed, please check credentials
- Error communicating with API: {err}
- coordinator_auth_error
- ConfigEntryAuthFailed
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/2ccc8e6c6aa12c61.
Report an issue: GitHub.