Authentication with 3rd party app - Nginx 502 Error page

The Netatmo API is a set of webservices allowing developers and third parties to access Netatmo device's data.
Post Reply
vincejah
Posts: 81
Joined: 21 Jan 2015, 09:16

Authentication with 3rd party app - Nginx 502 Error page

Post by vincejah » 27 Jan 2016, 16:44

Hi Netatmo Team,

I am experiencing difficulties with your authentication API when launching from Firefox browser.

When authenticating to Netatmo (with "Resté connecté" checked), your Nginx server replies with a 502 Error page. If "Resté connecté" is not checked, this works perfectly.
With Chrome browser, it always works ("Resté connecté" checked or not).

From what I understand, Firefox add additional headers that might overload your proxy buffer.

Could you please help me with this issue?

Vincent
PS: I can provide additional information if needed.

vincejah
Posts: 81
Joined: 21 Jan 2015, 09:16

Re: Authentication with 3rd party app - Nginx 502 Error page

Post by vincejah » 28 Jan 2016, 00:16

Hi,

The problem is not specific to my 3rd party application. I have tried with https://ifttt.com and problem occurs as well.

And BTW, this is not specific to Firefox. It also occurs on all other browsers.

This seems to be related to cookies: if all netatmo cookies are removed and then 3rd party authentication is initiated, we always get this 502 Error Page.
On the contrary, if authentication is done firstly in netatmo website (lots of cookies are generated), and then 3rd party authentication is initiated, it works.

Enzo
Posts: 42
Joined: 04 Jun 2015, 09:45

Re: Authentication with 3rd party app - Nginx 502 Error page

Post by Enzo » 28 Jan 2016, 08:51

Hi,

As a matter of fact, we do need these cookies to perform the authentication. You mustn't remove them during the process.

I've tried on my side to perform 3rd party authentication on Firefox and it works fine for me so far. However, if this problem still occurs when you don't remove our cookies, it is not a normal behavior. So feel free to contact me so that we could fix this.

Hope it helps,

Enzo
Enzo - Netatmo Team

vincejah
Posts: 81
Joined: 21 Jan 2015, 09:16

Re: Authentication with 3rd party app - Nginx 502 Error page

Post by vincejah » 28 Jan 2016, 09:16

Hi Enzo,

Thanks for your reply. I think you misunderstood my point: removing all Netatmo cookies manually in the browser before launching the 3rd party authentication was only for me a way to narrow down the issue.

If you want to reproduce the issue, here are the steps to follow:
- open your browser and clear everything (cookies/cache) to emulate the fact that this person never visited Netatmo before on that browser
- open a website that uses Netatmo 3rd party (for instance https://ifttt.com)
- add Netatmo Weather station channel
- once on the netatmo authorization page, enter your credentials and login

The problem will appear 100% of the time

trosenblatt
Posts: 233
Joined: 18 Sep 2012, 12:18

Re: Authentication with 3rd party app - Nginx 502 Error page

Post by trosenblatt » 28 Jan 2016, 09:21

Hello Vincejah,

You are totally right we are going to fix it ASAP.
Thank you for reporting it.

Regards,

Thomas.
Thomas Rosenblatt, Netatmo Team.

trosenblatt
Posts: 233
Joined: 18 Sep 2012, 12:18

Re: Authentication with 3rd party app - Nginx 502 Error page

Post by trosenblatt » 28 Jan 2016, 11:33

We have made a quick patch on nginx side that works, we are still digging why this happend to apply a proper correction.
Thomas Rosenblatt, Netatmo Team.

Post Reply

Return to “Netatmo API”