Google authentication problem on the master branch (invalid_request, missing parameter) with Drupal 7 #379

Closed
mlutfy opened this Issue Jan 15, 2015 · 0 comments

Projects

None yet

1 participant

@mlutfy
Contributor
mlutfy commented Jan 15, 2015

hybridauth v2.3.0 works fine with Drupal 7 and Google Authentication, but I was having a weird error on the master branch.

I traced it to this commit: d69729f from #296.

I think that:

if($params) curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query($params) );

Should be:

if($params) curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query($params, '', '&') );

This fixed the issue for me. Strangely, doing a print_r() on the resulting string didn't show a visible difference between the two strings, but doing a bin2hex() on it generated different strings. I also noticed that most http_build_query() calls in other providers seemed to be using those parameters as well.

This is a great library, many thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment