From 9d6d4b420d4279fe2d90d447921ac8e7a5ad74f5 Mon Sep 17 00:00:00 2001 From: Jezen Thomas Date: Wed, 6 Jul 2016 21:01:15 +0200 Subject: [PATCH] Rename creds key `email` -> `public_email` We had a name collision when trying to grab the GitHub user's email address, so if the user did not have a public email address the authentication would fail with a 500 (InvalidProfileResponse). --- Yesod/Auth/OAuth2/Github.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Yesod/Auth/OAuth2/Github.hs b/Yesod/Auth/OAuth2/Github.hs index 4162b32..aaf9ecd 100644 --- a/Yesod/Auth/OAuth2/Github.hs +++ b/Yesod/Auth/OAuth2/Github.hs @@ -107,7 +107,7 @@ toCreds user userMails token = Creds , ("access_token", decodeUtf8 $ accessToken token) ] ++ maybeExtra "name" (githubUserName user) - ++ maybeExtra "email" (githubUserPublicEmail user) + ++ maybeExtra "public_email" (githubUserPublicEmail user) ++ maybeExtra "location" (githubUserLocation user) }