emonarafat / socialauth-net

Automatically exported from code.google.com/p/socialauth-net
0 stars 0 forks source link

Google authentication calls the validate.sauth handler via POST #132

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

we are currently using version 2.3 of SocialAuth-net library.

When performing a login process with Google we sometimes (apparently randomly) 
encountered an error in the execution of the validate.sauth handler.

The error was generated by the LoginCallback static method inside the 
SocialAuthUser class, and was a mysterious "invalid token request".

What we discovered, after some debugging, was that in reality the response from 
Google sent all the required parameters in the message body (POST) instead of 
the querystring (GET) [which is the behavior that SocialAuth-net is expecting]. 
This apparently does not happen every time.

So, when executing the Utility.GetQuerystringParameters(response) function, in 
the latter case (GET) everything worked smoothly, in the former (POST) instead 
it couldn't find anything at all.

Is this an error on our side? I mean is there some ways to tell Google to send 
their response parameters in querystring instead of the message body? Or is it 
just pseudo-randomly chosen by Google at the time of the login?

You can find, as an attachment, the Fiddler capture (we managed to isolate the 
2 cases).

Let me know if you need more information.

Original issue reported on code.google.com by paolo.lo...@gmail.com on 28 Nov 2012 at 12:50

Attachments:

GoogleCodeExporter commented 9 years ago
We haven't faced such an issue yet. Could you please mention which parameters 
which are expected in GET are coming from POST?

Deepak

Original comment by deepak.a...@3pillarglobal.com on 14 Dec 2012 at 10:10