From 00cbd5a9a8885a8da461609d6fdb2602e72cee7c Mon Sep 17 00:00:00 2001 From: Gregory Waxman Date: Fri, 11 Jul 2014 16:11:32 -0400 Subject: [PATCH 1/2] Switched to using the new google api endpoint --- lib/services/google.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/services/google.js b/lib/services/google.js index e38c2a4..23c5f19 100644 --- a/lib/services/google.js +++ b/lib/services/google.js @@ -29,9 +29,13 @@ function Google(options) { this.user = { host: "www.googleapis.com", - path: "/oauth2/v1/userinfo", + path: "/plus/v1/people/me", query: {} } + + if(options.fields) { + this.user.query.fields = options.fields.join(",") + } this.on("request", this.onRequest.bind(this)) From 3dc59175256d303cb4f2f12ef2f86c7860cc683a Mon Sep 17 00:00:00 2001 From: Gregory Waxman Date: Fri, 11 Jul 2014 16:24:14 -0400 Subject: [PATCH 2/2] Default to legacy until removed --- lib/services/google.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/google.js b/lib/services/google.js index 23c5f19..f85139f 100644 --- a/lib/services/google.js +++ b/lib/services/google.js @@ -29,7 +29,7 @@ function Google(options) { this.user = { host: "www.googleapis.com", - path: "/plus/v1/people/me", + path: "/plus/v1/people/me" + (options.useOpenIdConnect === undefined || options.useOpenIdConnect ? '/openIdConnect/' : ''), query: {} }