Skip to content

EcobeeAuthUnknownError: "Unexpected response after login" on Auth0 /u/custom-prompt/ during web auth flow #88

Description

@parrot-tailor

When using the username/password web authentication flow (with MFA enabled), calling refresh_tokens() can fail with:

EcobeeAuthUnknownError: Unexpected response after login (landed at https://auth.ecobee.com/u/custom-prompt/...)

Reproduction:

from pyecobee import Ecobee

config = {
    ECOBEE_USERNAME: "your@email.com",
    ECOBEE_PASSWORD: "yourpassword",
}

ecobee = Ecobee(config=config)
ecobee.refresh_tokens()   # raises EcobeeAuthUnknownError

Additional Details:

  • The library successfully posts credentials via request_tokens_web().
  • It then lands on an Auth0 /u/custom-prompt/ page.
  • _handle_post_password_response() has no matching case for this path and raises EcobeeAuthUnknownError.
  • There is currently no handling for custom-prompt paths in const.py.

This results in failures in downstream projects (e.g. Home Assistant’s ecobee integration shows a generic “unexpected error”)

Environment:

  • python-ecobee-api version: 0.4.1 (master branch)
  • Triggered via standalone usage and via Home Assistant 2026.7.0 ecobee integration

Related: home-assistant/core#170439

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions