After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 720446 - add profile scope to google provider
add profile scope to google provider
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-12-14 04:17 UTC by Matthias Clasen
Modified: 2013-12-14 10:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Google: Request profile scope (1.03 KB, patch)
2013-12-14 04:24 UTC, Matthias Clasen
needs-work Details | Review
google: Request profile scope (1.23 KB, patch)
2013-12-14 10:45 UTC, Debarshi Ray
committed Details | Review

Description Matthias Clasen 2013-12-14 04:17:36 UTC
This will let us access the name and avatar picture of the account. We want to use this in gnome-initial-setup to prepopulate the local account information.

Currently, I am getting the following information:
{
 "id": "103842270499979733054",
 "email": "matthias.clasen@gmail.com",
 "verified_email": true
}

After adding

https://www.googleapis.com/auth/userinfo.profile

to the scopes, I get

{
 "id": "107600591154209788182",
 "email": "angela.gnome@gmail.com",
 "verified_email": true,
 "name": "Angela Avery",
 "given_name": "Angela",
 "family_name": "Avery",
 "link": "https://plus.google.com/107600591154209788182",
 "picture": "https://lh3.googleusercontent.com/-t4XL5dtPWqw/AAAAAAAAAAI/AAAAAAAAACQ/GT4NBfd2ZOQ/photo.jpg",
 "gender": "female",
 "locale": "en"
}
Comment 1 Matthias Clasen 2013-12-14 04:24:53 UTC
Created attachment 264185 [details] [review]
Google: Request profile scope

This gives us access to the user name and picture, which will
be used in gnome-initial-setup to prepopulate the local account.
Comment 2 Debarshi Ray 2013-12-14 10:44:03 UTC
Review of attachment 264185 [details] [review]:

Thanks for the patch.

::: src/goabackend/goagoogleprovider.c
@@ +129,2 @@
          /* Google Calendar API (CalDAV and GData) */
          "https://www.googleapis.com/auth/calendar "

You should also bump the credentials generation (it is the next method in the same file) so that existing OAuth tokens are updated to work with the new set of scopes.
Comment 3 Debarshi Ray 2013-12-14 10:45:18 UTC
Created attachment 264190 [details] [review]
google: Request profile scope

Bumped the credentials generation.