[gnome-online-accounts/gnome-3-28] google: Only request the email field when getting the user's identity
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-28] google: Only request the email field when getting the user's identity
- Date: Sun, 10 Feb 2019 19:37:17 +0000 (UTC)
commit 3b6a2bbcbed0dc501f8b5f789fd972d407447270
Author: Neil McGovern <neil gnome org>
Date: Thu Jan 31 14:24:19 2019 +0100
google: Only request the email field when getting the user's identity
Currently, a lot of personal information was being received, including
gender and profile picture. The email is the only thing that's really
used, for the account's identity and presentation identy, and the rest
was being simply thrown away. Therefore, avoid receiving them in the
first place.
Verified via the Google APIs Explorer and the Google OAuth 2.0
Playground:
https://developers.google.com/apis-explorer/#p/oauth2/v2/oauth2.userinfo.get
https://developers.google.com/oauthplayground/
https://gitlab.gnome.org/GNOME/gnome-online-accounts/merge_requests/19
src/goabackend/goagoogleprovider.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index e27c6d27..6e4ace2d 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -180,6 +180,7 @@ get_identity_sync (GoaOAuth2Provider *oauth2_provider,
call = rest_proxy_new_call (proxy);
rest_proxy_call_set_method (call, "GET");
rest_proxy_call_add_param (call, "access_token", access_token);
+ rest_proxy_call_add_param (call, "fields", "email");
if (!rest_proxy_call_sync (call, error))
goto out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]