cakephp-opauth icon indicating copy to clipboard operation
cakephp-opauth copied to clipboard

"Invalid auth response: Missing key auth response components."

Open italianocaliente opened this issue 11 years ago • 2 comments

Ubuntu 13.10, Apache2, PHP, Mysql Configuration. Using CakePHP 2.5.1 Using latest cakephp-opauth component

Was working before system upgrade from Ubuntu 12 to Ubuntu 13.10

Php allow_fopen is set to On.

$this->Auth->allow('*'); was added to BeforeFilter in OpauthController - but triggered an error. It seems $this->Auth->allow(); doesn't trigger an error though.

Using, Facebook, Twitter and Google strategies (All three return the following error)

array(2) { ["error"]=> array(3) { ["provider"]=> NULL ["code"]=> string(31) "invalid_auth_missing_components" ["message"]=> string(60) "Invalid auth response: Missing key auth response components." } ["validated"]=> bool(false) }

Any help would be greatly appreciated.

italianocaliente avatar Jun 03 '14 07:06 italianocaliente

Seems to be a problem with authentication provider sending the authenticated data back to your app.

uzyn avatar Jun 03 '14 07:06 uzyn

Hello, I also recieve this error from google: array( 'error' => array( provider' => null,
'code' => 'invalid_auth_missing_components', 'message' => 'Invalid auth response: Missing key auth response components.'), 'validated' => false)

i am using cakephp 2.4.6 and configured config files as described. I ONLY manually changed folowing line to recieve at least some response otherwise all i get is redirect url missmatch from google: in Opauth/Strategy/Google/GoogleStrategy.php line 37: from 'redirect_uri' => '{complete_url_to_strategy}oauth2callback', to 'redirect_uri' => 'http://mylink.com/auth/callback'.

At click on google sign in i get normal google app permission window to accept terms and then i get upper error. url at error is: mylink.com/auth/callback?code=4/xJSNmUZ7gMpYiIiB3JRtjrv4mxYK.4mwd5Gjm2iwbOl05ti8ZT3bL9JzmjQI and error in opauth controller: Notice (8): Undefined index: opauth [APP/Plugin/Opauth/Controller/OpauthAppController.php, line 57] ->assuming to false response.

I tried with Client ID for web application and Client ID for native application-> like some developers solve their problem, but my exist. I have no problem with twitter or facebook.

Am whiling to provide some extra request urls that we solve this problem, and prevent others from this problem. (example on opauth page running fine; i recieved right data from my google account)

So any tips how to make google authentication to work?

XMMM1 avatar Jul 01 '14 19:07 XMMM1