diff --git a/lib/services/google.js b/lib/services/google.js index e38c2a4..f85139f 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" + (options.useOpenIdConnect === undefined || options.useOpenIdConnect ? '/openIdConnect/' : ''), query: {} } + + if(options.fields) { + this.user.query.fields = options.fields.join(",") + } this.on("request", this.onRequest.bind(this))