So anyone on the local network bypasses login and uses the specific user_id
So you can specify an ipaddress 192.1.1.1: username and then any user from that IP address will get logged in automatically.
I have similar issues with trusted_networks auth provider and it did not want to work no matter how I tried.
Then, I found a crucial setting that clashed with this on the official page.
I am using NGINX proxy to reach my HA from outside of the network via an encrypted channel.
It turned out that once you set up an IP address for trusted_proxies it cannot be used in the trusted_networks too. They will simply not work.
So, I added my localhost IP 127.0.0.1 to the trusted proxy and removed everything else, while adding the IP address of the machine on my local network. My issue was that I wanted to have the same device to be allowed to bypass authentication.
I am using raspberry pi for HA and it has a touchscreen connected to it. So I choose 192.168.0.X/32 for trusted_networks which is the IP address of the raspberry pi itself.