Fix Facebook

This commit is contained in:
Michael Snoyman 2011-12-12 07:18:21 +02:00
parent b5b5c54135
commit 0bca582b01
3 changed files with 3 additions and 4 deletions

View File

@ -67,8 +67,8 @@ parseCreds :: Text -> Value -> Data.Aeson.Types.Parser (Creds m)
parseCreds at' (Object m) = do parseCreds at' (Object m) = do
id' <- m .: "id" id' <- m .: "id"
let id'' = "http://graph.facebook.com/" `mappend` id' let id'' = "http://graph.facebook.com/" `mappend` id'
name <- m .: "name" name <- m .:? "name"
email <- m .: "email" email <- m .:? "email"
return return
$ Creds "facebook" id'' $ Creds "facebook" id''
$ maybe id (\x -> (:) ("verifiedEmail", x)) email $ maybe id (\x -> (:) ("verifiedEmail", x)) email

View File

@ -10,7 +10,6 @@ import Web.Authenticate.Facebook
import Yesod.Form import Yesod.Form
data FB = FB Facebook data FB = FB Facebook
type Handler = GHandler FB FB
fb :: FB fb :: FB
fb = FB Facebook fb = FB Facebook

View File

@ -1,5 +1,5 @@
name: yesod-auth name: yesod-auth
version: 0.7.7 version: 0.7.7.1
license: BSD3 license: BSD3
license-file: LICENSE license-file: LICENSE
author: Michael Snoyman, Patrick Brisbin author: Michael Snoyman, Patrick Brisbin