Dataplicity
Dataplicity copied to clipboard
IP address changed
It appears that each request to the wormhole may come from a different proxy IP address (looks like an internal Dataplicity network 10.20/16). This is a problem when logging into HA because of the following check (components/auth/login_flow.py:270):
if flow["context"]["ip_address"] != ip_address(request.remote):
return self.json_message("IP address changed", HTTPStatus.BAD_REQUEST)
So when the login page is opened, HA stores the remote IP address. Then when credentials are submitted, the IP address is compared with the stored one. Sometimes I get lucky and credentials are accepted, but then the second factor is requested which means yet another IP address check. I've never been able to get past that second check. I had to comment out the code in order to log in successfully.
Have you experienced it as well?
Ok, I have figured out it's a matter of configuring trusted proxies in HA. I can see the integration sets up 127.0.0.1 as a trusted proxy, but it's not enough. Why is nobody else reporting it? Am I the only one unlucky enough to experience the changing address?
Confirm. I have the same problem.