sdd / ExtAuth

A CakePHP Plugin for quick, easy federated login / external authentication (via OAuth1 and OAuth2).
18 stars 11 forks source link

Error logging in with new Gmail account #9

Open mrprowse opened 9 years ago

mrprowse commented 9 years ago

Logging in with my ages-old Gmail account worked fine. When I tried to login with a newly-created Gmail email address, I got the following error:

Notice (8): Undefined index: oid [APP/Controller/AppUsersController.php, line 107] Code Context $this->SocialProfile->recursive = -1; $existingProfile = $this->SocialProfile->find('first', array( 'conditions' => array('oid' => $incomingProfile['oid']) $incomingProfile = array( 'given_name' => 'Josh', 'family_name' => 'Prowse', 'picture' => 'https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg', 'locale' => 'en', 'username' => 'Josh Prowse', 'raw' => '{ "id": "103780668085339462184", "name": "Josh Prowse", "given_name": "Josh", "family_name": "Prowse", "picture": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg", "locale": "en" } ', 'provider' => 'Google' ) $accessToken = 'ya29.9AFkPJkBYKt5UFrICM6HkHyuGRn2iaiq0sj-yNneFKWwS5k8qP7Qo9hDuokgYZyyLFiC' AppUsersController::__successfulExtAuth() - APP/Controller/AppUsersController.php, line 107 AppUsersController::auth_callback() - APP/Controller/AppUsersController.php, line 94 ReflectionMethod::invokeArgs() - [internal], line ?? Controller::invokeAction() - APP/Vendor/pear-pear.cakephp.org/CakePHP/Cake/Controller/Controller.php, line 490 Dispatcher::_invoke() - APP/Vendor/pear-pear.cakephp.org/CakePHP/Cake/Routing/Dispatcher.php, line 187 Dispatcher::dispatch() - APP/Vendor/pear-pear.cakephp.org/CakePHP/Cake/Routing/Dispatcher.php, line 162 [main] - APP/webroot/index.php, line 98