{"action":"created","issue":{"url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/205","labels_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/205/labels{/name}","comments_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/205/comments","events_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/205/events","html_url":"https://github.com/thephpleague/oauth2-client/issues/205","id":54726244,"number":205,"title":"When using google as provider: $provider->getUserDetails($token) throws Unknown Error","user":{"login":"ideadx","id":2369963,"avatar_url":"https://avatars.githubusercontent.com/u/2369963?v=3","gravatar_id":"","url":"https://api.github.com/users/ideadx","html_url":"https://github.com/ideadx","followers_url":"https://api.github.com/users/ideadx/followers","following_url":"https://api.github.com/users/ideadx/following{/other_user}","gists_url":"https://api.github.com/users/ideadx/gists{/gist_id}","starred_url":"https://api.github.com/users/ideadx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ideadx/subscriptions","organizations_url":"https://api.github.com/users/ideadx/orgs","repos_url":"https://api.github.com/users/ideadx/repos","events_url":"https://api.github.com/users/ideadx/events{/privacy}","received_events_url":"https://api.github.com/users/ideadx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-19T04:54:46Z","updated_at":"2015-03-11T04:20:34Z","closed_at":null,"body":"Facebook works fine but same code while Googel as provider is throwing  Ohh dear users.login.google Exception: Unknown Error\r\n\r\nhere is what I am trying to do:\r\n```\r\n$provider = new League\\OAuth2\\Client\\Provider\\Google(array(\r\n\t\t\t'clientId' => Config::get('sso.googleClientID'),\r\n\t\t\t'clientSecret' => Config::get('sso.googleClientSecret'),\r\n\t\t\t'redirectUri' => URL::to('/') . Config::get('sso.googleClientRedirect'),\r\n\t\t\t'scopes' => array('email','profile'),\r\n\t\t\t));\r\n\r\n\t\t$code = Input::get('code');\r\nif (!isset($code)) {\r\n\t\t\t// If we don't have an authorization code then get one\r\n\t\t\theader('Location: ' . $provider->getAuthorizationUrl());\r\n\t\t\texit;\r\n\t\t} else {\r\n\t\t\t// Try to get an access token (using the authorization code grant)\r\n\t\t\t$token = $provider->getAccessToken('authorization_code', [\r\n\t\t\t\t'code' => $code\r\n\t\t\t\t]);\r\n\r\n\t\t\t// Optional: Now you have a token you can look up a users profile data\r\n\t\t\ttry {\r\n\r\n\t\t\t\t// We got an access token, let's now get the user's details\r\n\r\n\t\t\t\t/* \r\n\t\t\t\t\tError: Ohh dear users.login.google Exception: Unknown Error.\r\n\t\t\t\t*/\r\n\r\n\t\t\t\t$userInfo = $provider->getUserDetails($token);\r\n\t\t\t\t//generate user\r\n\t\t\t\t$this->generateSocialUser($token, $userInfo,'google');\r\n\t\t\t} catch (Exception $e) {\r\n\t\t\t\t// Failed to get user details\r\n\t\t\t\techo 'Ohh dear users.login.google ' . $e;\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\r\n\t\t}\r\n```\r\nsame code works fine when login using facebook. \r\nThank you."},"comment":{"url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/comments/78202902","html_url":"https://github.com/thephpleague/oauth2-client/issues/205#issuecomment-78202902","issue_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/205","id":78202902,"user":{"login":"mseshachalam","id":5608918,"avatar_url":"https://avatars.githubusercontent.com/u/5608918?v=3","gravatar_id":"","url":"https://api.github.com/users/mseshachalam","html_url":"https://github.com/mseshachalam","followers_url":"https://api.github.com/users/mseshachalam/followers","following_url":"https://api.github.com/users/mseshachalam/following{/other_user}","gists_url":"https://api.github.com/users/mseshachalam/gists{/gist_id}","starred_url":"https://api.github.com/users/mseshachalam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mseshachalam/subscriptions","organizations_url":"https://api.github.com/users/mseshachalam/orgs","repos_url":"https://api.github.com/users/mseshachalam/repos","events_url":"https://api.github.com/users/mseshachalam/events{/privacy}","received_events_url":"https://api.github.com/users/mseshachalam/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T04:20:34Z","updated_at":"2015-03-11T04:20:34Z","body":"@ramsey yes. enabling Google+ API fixes this but it has a limit on number of calls."}}