From c5f11b696cec34dbd5691c2a4b4aaea087fb5125 Mon Sep 17 00:00:00 2001 From: Tim Burks Date: Sat, 30 Dec 2017 13:10:28 -0800 Subject: [PATCH] Fix Examples/Google for linux builds. --- Sources/Examples/Google/main.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/Examples/Google/main.swift b/Sources/Examples/Google/main.swift index 68a4f84..b7e6579 100644 --- a/Sources/Examples/Google/main.swift +++ b/Sources/Examples/Google/main.swift @@ -29,17 +29,17 @@ func main() throws { return } + let scopes = ["profile", + "https://www.googleapis.com/auth/contacts.readonly", + "https://www.googleapis.com/auth/cloud-platform"] + var tokenProvider : TokenProvider #if os(OSX) tokenProvider = BrowserTokenProvider(credentials:CLIENT_CREDENTIALS, token:TOKEN)! #else - tokenProvider = DefaultTokenProvider()! + tokenProvider = DefaultTokenProvider(scopes:scopes)! #endif - let scopes = ["profile", - "https://www.googleapis.com/auth/contacts.readonly", - "https://www.googleapis.com/auth/cloud-platform"] - if USE_SERVICE_ACCOUNT { if #available(OSX 10.12, *) { let homeURL = FileManager.default.homeDirectoryForCurrentUser