mylesagray / homebridge-blueair

BlueAir air purifier plugin for homebridge
Apache License 2.0
39 stars 20 forks source link

Issue with the /login method #20

Closed alackmann closed 5 years ago

alackmann commented 5 years ago

Does the https://{{homehost}}/v2/user/{{username}}/login/ method still function? I'm testing using your Postman collection and can't retrieve my X-AUTH-TOKEN using this method - it simply returns false.

I was able to proxy my traffic from the iOS app using Charles and found the login method is never called - instead login seems to use webviews via Gigya. Is this a new development? Or just an anomaly?

Once I have my auth token from iOS, I can use the rest of the Postman collection correctly - so I don't think it's something I'm doing. I haven't tried the code yet as I don't use homebridge. I am looking to fork your work into a similar connector for OpenHAB

For the record, my X-API-KEY-TOKEN is the same as yours too (Australia) so it does indeed look to be global.

alackmann commented 5 years ago

So I solved this myself. Seems my ridiculous password with symbols galore was likely not being encoded correctly by Postman (strange: thought the base64 would negate any other required encoding). Simplified my password and tried again and it's now returning true with an X-AUTH-TOKEN header in the response :)