Login attempt/request with invalid authentication

Hi,

Recently I’ve been getting the message:
Login attempt or request with invalid authentication “local IP” (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0)

As for access - everything works. PC like IOS App.
I have no idea why this keeps coming up.

configuration.yaml:

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.16.0.0/12
    - 127.0.0.1
    - 172.30.32.0/24

Version:
Home Assistant Core 2022.5.5
Home Assistant Supervisor 2022.05.3
Home Assistant OS 8.1
Kernel version 5.15.41
Agent version 1.2.1

NGINX Config:

certfile: fullchain.pem
active: false
default: nginx_proxy_default*.conf
servers: nginx_proxy/*.conf
hsts:max-age=31536000; includeSubDomains
domain: "homeass.local.net"
Port: 443
keyfile: privkey.pem

NGINX LOG:

2022/05/30 20:04:34 [error] 253#253: *81 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.xx.83, server: homeass.local.net, request: "GET /api/websocket HTTP/1.1", upstream: "http://172.30.32.1:8123/api/websocket", host: "homeass.local.net"
2 Likes

Have you solved your problem?

Hi,

The problem no longer appears.
Could be due to the line in “configuration.yaml”
Entered the hostname.

home assistant:
   name: lhoas01

In my case problem was, that Nginx proxy did not proxying WebSockets.

After fixing it, you have to clear browser cache. If you do not clear the cache, then web is trying to login by token, which is not probably valid anymore (but it is stored somewhere in local storage).

Hi. Could you write exactly what needs to be entered in confyaml. I have an incorrect configuration when checking. Thank you.