osresearch / hcpy

Python tool to talk to Home Connect appliances over the local network (no cloud required)
276 stars 32 forks source link

Handle 307 redirects in hc-login (#35) #37

Open jorritolthuis opened 11 months ago

jorritolthuis commented 11 months ago

Properly handle 307 redirects, in the same way 302 redirects are already handled. See issue #35 and https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_redirection.

pmagyar commented 11 months ago

Had the same issue too. Testing is tricky but the code looks fine and does not break something else.

jorritolthuis commented 11 months ago

I agree that testing is a problem. I was not able to find any documentation for singlekey-id.com, so best I can do is assume they strictly follow Oauth. But Oauth should never return a 307, so I'm slightly confused there.

In either case the hc-login script doesn't finish successfully for me. So I can't guarantee that 307 forward does/doesn't get me closer to a working setup.