home-assistant / iOS

:iphone: Home Assistant for Apple platforms
https://companion.home-assistant.io
Other
1.53k stars 297 forks source link

Invalid Authentication #1871

Open PierreScerri opened 2 years ago

PierreScerri commented 2 years ago

The problem

When I open the companion app on my iPhone, I sometimes get a 'Login attempt or request with invalid authentication from...' error (see log below), which forces me to go through the onboarding sequence in the app (as if I have just installed the app)

What is version of Home Assistant Core has the issue?

2021.9.7

What was the last working version of Home Assistant Core?

unknown

What type of installation are you running?

Home Assistant OS

Integration causing the issue

http

Link to integration documentation on our website

https://www.home-assistant.io/integrations/http

Example YAML snippet

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.30.33.0/24
  ip_ban_enabled: true
  login_attempts_threshold: 5

Anything in the logs that might be useful for us?

Logger: homeassistant.components.http.ban
Source: components/http/ban.py:124
Integration: HTTP (documentation, issues)
First occurred: 8:08:39 AM (1 occurrences)
Last logged: 8:08:39 AM

Login attempt or request with invalid authentication from fe80::8af:a02c:71c5:1f7e (fe80::8af:a02c:71c5:1f7e). (Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Home Assistant/2021.8 (io.robbie.HomeAssistant; build:2021.216; iOS 15.0.0) Mobile/HomeAssistant, like Safari)

Additional information

No response

zacwest commented 1 year ago

Once the above-linked PR in the frontend is merged & released, it'll be worthwhile to see what other paths cause authentication errors similar to the history calls mentioned earlier.

gsugar87 commented 1 year ago

I had this same issue when trying to sign in using the Google Home app on iOS. The solution was to type in the username and password rather than copying it from the password manager. For some reason the username and password are not sent correctly when copied into the fields.

gaieges commented 1 year ago

The solution was to type in the username and password rather than copying it from the password manager.

Wow, I spent way too much time on this to find that this was the problem / solution. Thank you for the suggestion @gsugar87 !

It sounds like that might be a bug in the frontend

tlpbu commented 7 months ago

I had this same issue when trying to sign in using the Google Home app on iOS. The solution was to type in the username and password rather than copying it from the password manager. For some reason the username and password are not sent correctly when copied into the fields.

I am glad I found this only after ~1 hour spent on this nasty problem. Indeed this must be addressed by HA ASAP by fixing login form.

toby-griffiths commented 7 months ago

Please remember to be kind to the great people working on HA. They work hard to give us this amazing platform for free.

Can people who’ve got this working please share useful information that can help resolve this, such as which password manager they are having the issue with, what OS and version this is an issue on, and anything else useful, to help the HA contributors to replicate the issue?