From 0677659917bce99f2d5012d6d1caf2b6f91de93f Mon Sep 17 00:00:00 2001
From: Ben Adida <ben@adida.net>
Date: Tue, 29 Jan 2019 18:09:11 +0000
Subject: [PATCH] upgrade google APIs

---
 helios_auth/auth_systems/google.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/helios_auth/auth_systems/google.py b/helios_auth/auth_systems/google.py
index b6eb57c..7caa32f 100644
--- a/helios_auth/auth_systems/google.py
+++ b/helios_auth/auth_systems/google.py
@@ -50,11 +50,11 @@ def get_user_info_after_auth(request):
   # get the nice name
   http = httplib2.Http(".cache")
   http = credentials.authorize(http)
-  (resp_headers, content) = http.request("https://www.googleapis.com/plus/v1/people/me", "GET")
+  (resp_headers, content) = http.request("https://people.googleapis.com/v1/people/me?personFields=names", "GET")
 
   response = json.loads(content)
 
-  name = response['displayName']
+  name = response['names'][0]['displayName']
   
   # watch out, response also contains email addresses, but not sure whether thsoe are verified or not
   # so for email address we will only look at the id_token
-- 
GitLab