on develop help sign in
fix the URL to use when authenticating a user
70143bfAleksey Makarov
gogol/src/Network/Google/Auth/ServiceAccount.hs+1−1
@@ -76,7 +76,7 @@ authorizedUserToken u r = refreshRequest $
76 <> "&refresh_token=" <> toQueryParam (fromMaybe (_userRefresh u) r)
76 <> "&refresh_token=" <> toQueryParam (fromMaybe (_userRefresh u) r)
77 }
77 }
78
78
79−-- | Obtain an 'OAuthToken' from @https://accounts.google.com/o/oauth2/token@
79+-- | Obtain an 'OAuthToken' from @https://accounts.google.com/o/oauth2/v2/auth@
80-- by signing and sending a JSON Web Token (JWT) using the supplied 'ServiceAccount'.
80-- by signing and sending a JSON Web Token (JWT) using the supplied 'ServiceAccount'.
81serviceAccountToken :: (MonadIO m, MonadCatch m, AllowScopes s)
81serviceAccountToken :: (MonadIO m, MonadCatch m, AllowScopes s)
82 => ServiceAccount
82 => ServiceAccount
gogol/src/Network/Google/Internal/Auth.hs+3−3
@@ -245,9 +245,9 @@ instance FromJSON RefreshError where
245 <$> o .: "error"
245 <$> o .: "error"
246 <*> o .:? "error_description"
246 <*> o .:? "error_description"
247
247
248−-- | @https://accounts.google.com/o/oauth2/token@.
248+-- | @https://accounts.google.com/o/oauth2/v2/auth@.
249accountsURL :: Text
249accountsURL :: Text
250−accountsURL = "https://accounts.google.com/o/oauth2/token"
250+accountsURL = "https://accounts.google.com/o/oauth2/v2/auth"
251
251
252accountsRequest :: Client.Request
252accountsRequest :: Client.Request
253accountsRequest = def
253accountsRequest = def
@@ -256,7 +256,7 @@ accountsRequest = def
256 , Client.secure = True
256 , Client.secure = True
257 , Client.checkStatus = \_ _ _ -> Nothing
257 , Client.checkStatus = \_ _ _ -> Nothing
258 , Client.method = "POST"
258 , Client.method = "POST"
259− , Client.path = "/o/oauth2/token"
259+ , Client.path = "/o/oauth2/v2/auth"
260 , Client.requestHeaders =
260 , Client.requestHeaders =
261 [ (hContentType, "application/x-www-form-urlencoded")
261 [ (hContentType, "application/x-www-form-urlencoded")
262 ]
262 ]