hybridauth/hybridauth — pull request #119 by redaktor (2013-04-14 09:30:13+00:00)
Title: Google.php - multiple updates

The google provider used a deprecated scope, did not make use of the verified email and imported mail contacts only. It did not support google+ ...

*google recommends the following scopes :*
https://developers.google.com/+/api/oauth#scopes

*It is a bit hard to define a google provider because google consists of many different services and APIs.* However:
hybridauth should at least follow the new OAuth scopes to support google+ but leave it to the user to customize the scopes ...
# UPDATES

### 1. Updated scopes and made them dynamic
+ auth/plus.login as the main log in scope
+ auth/userinfo.email for verified email (optional now)
+ /m8/feeds/ for gmail contacts (optional now)

[ if a user does not want to use contacts, and just wants a plain profile, he can use .../auth/plus.me as the only scope as well, e.g. see http://hybridauth.sourceforge.net/support.html?place=msg%2Fhybridauth%2F9RL9irlM7ws%2FLz87NyLq9ZoJ ]

The advantage of the new login scope is that the user can select which social connections hybridauth is able to use (e.g. which contacts we get) wrapped in a brilliant UI.

### 2. Makes use of verified mail now depending on the scope
- [x] by making a request to /userinfo

### 3. Supports google+ now
- [x] google+ profile
- [x] google+ contacts

### 4. Updated API versions
- [x] v1 for "new scopes"/google+
- [x] v2 for userinfo
- [x] v3 for gmail contacts