From ec6fd486b6845e8fee4f276188bd8545eb7a7732 Mon Sep 17 00:00:00 2001 From: Greg Weber Date: Thu, 11 Sep 2014 13:17:24 -0700 Subject: [PATCH] remove the id_token parameter We saw this error: Internal Server Error key "id_token" not present --- yesod-auth/Yesod/Auth/GoogleEmail2.hs | 5 ++--- yesod-auth/yesod-auth.cabal | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/yesod-auth/Yesod/Auth/GoogleEmail2.hs b/yesod-auth/Yesod/Auth/GoogleEmail2.hs index 04afd433..e7e6829b 100644 --- a/yesod-auth/Yesod/Auth/GoogleEmail2.hs +++ b/yesod-auth/Yesod/Auth/GoogleEmail2.hs @@ -156,7 +156,7 @@ authGoogleEmail clientID clientSecret = manager <- liftM authHttpManager $ lift getYesod res <- http req manager value <- responseBody res $$+- sinkParser json' - Tokens accessToken _idToken tokenType <- + Tokens accessToken tokenType <- case parseEither parseJSON value of Left e -> error e Right t -> return t @@ -184,11 +184,10 @@ authGoogleEmail clientID clientSecret = dispatch _ _ = notFound -data Tokens = Tokens Text Text Text +data Tokens = Tokens Text Text instance FromJSON Tokens where parseJSON = withObject "Tokens" $ \o -> Tokens <$> o .: "access_token" - <*> o .: "id_token" <*> o .: "token_type" data Person = Person [Email] diff --git a/yesod-auth/yesod-auth.cabal b/yesod-auth/yesod-auth.cabal index 2f32c9d9..6affcb56 100644 --- a/yesod-auth/yesod-auth.cabal +++ b/yesod-auth/yesod-auth.cabal @@ -1,5 +1,5 @@ name: yesod-auth -version: 1.3.4.3 +version: 1.3.4.4 license: MIT license-file: LICENSE author: Michael Snoyman, Patrick Brisbin