Can't connect to HA from work computer, using Nabu Casa

Hey,
I’m subscribed to Nabu Casa cloud and it works well for my laptop, mobile phone and mobile app.
I’m using the Nabu Casa link, and my username and password.

But for some reason when I try to connect from the computer at my work place,
I reach the page of entering user name and password, and when I type them correctly,
I get this message:

Unable to connect to Home Assistant.
RETRY
It is possible that you are seeing this screen because your Home Assistant is not currently connected. You can ask it to come online via [the Remote UI portal](https://remote.nabucasa.com/).
  • I’m sure the cloud is connected because i can reach it from my mobile at the same time.
  • I’m sure the username and password are correct because if they’re wrong i get a different message

I tried to look at the Developer tools of the browser under Network , I see that the problem is with the ‘token’ element (status 400).

I also get this message on HA notifications:

**Login attemp failed**
login attempt or request with invalid authentication from localhost (127.0.0.1) (Mozilla/5.8(Windows NT 10.0;Win64; x64) AppleWebKit/537.36(KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36)

I also tried to add “127.0.0.1” to the list of trusted_proxies under html and also under trusted_networks (lists which I usually don’t have at all). It didn’t help either.

Any suggestions?
Thanks.

If your employer does HTTPS inspection you may need to exclude the relevant Nabu Casa domains from inspection.
We use WatchGuard firewalls and I had a similar issue myself.

I thought it may be the cause, but then wouldn’t I not see the login attemp fail on HA?
I see in the log details “logger: homeassistant.components.http.ban”

doesn’t it mean that HA blocks the login somehow?

My issue was that the firewalls were finding the traffic from client to HA to be invalid when processing through the HTTPS proxy - with ProxyDeny: HTTP chunk size invalid reported in the firewall.

HA v0.90 reported

Login attempt or request with invalid authentication from 127.0.0.1
Error handling message: Unauthorized
Traceback (most recent call last):
       File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/websocket_api/connection.py", line 84, in async_handle
    handler(self.hass, self, schema(msg))
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/websocket_api/commands.py", line 52, in handle_subscribe_events
raise Unauthorized
homeassistant.exceptions.Unauthorized: Unauthorized

It’s reasonable to assume that HA’s reporting and handling of login failures may have changed since my issue.