yesod-auth-fb 1.9.1 → 1.10.0
raw patch · 4 files changed
+33/−13 lines, 4 filesdep ~basedep ~bytestringdep ~fbPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, bytestring, fb, text, time, transformers, yesod-fb
API changes (from Hackage documentation)
Files
- CHANGELOG.md +9/−0
- README.md +5/−0
- src/Yesod/Auth/Facebook/ClientSide.hs +11/−5
- yesod-auth-fb.cabal +8/−8
CHANGELOG.md view
@@ -1,3 +1,12 @@+# Version 1.10.0++* Relax bounds for latest lts+* Upper bounds for fb, yesdod-fb etc.++# Version 1.9.1.0++* Compiles for GHC 8.6 now+ # Version 1.9.1 * Only pass `code` query param to getUserAccessTokenStep2
README.md view
@@ -2,6 +2,11 @@ --------------- [](https://travis-ci.org/psibi/yesod-auth-fb)+[](https://hackage.haskell.org/package/yesod-auth-fb)+[](http://stackage.org/nightly/package/yesod-auth-fb)+[](http://stackage.org/lts/package/yesod-auth-fb) Authentication backend for Yesod using Facebook
src/Yesod/Auth/Facebook/ClientSide.hs view
@@ -1,5 +1,6 @@ {-#LANGUAGE RankNTypes#-} {-#LANGUAGE ScopedTypeVariables#-}+{-#LANGUAGE LambdaCase#-} -- | @yesod-auth@ authentication plugin using Facebook's -- client-side authentication flow. You may see a demo at@@ -227,6 +228,7 @@ -- -- Minimal complete definition: 'getFbChannelFile'. (We -- recommend implementing 'getFbLanguage' as well.)+-- class (YesodAuth site, YF.YesodFacebook site, MonadFail site) => YesodAuthFbClientSide site where class (YesodAuth site, YF.YesodFacebook site) => YesodAuthFbClientSide site where -- | A route that serves Facebook's channel file in the /same/ -- /subdomain/ as the current request's subdomain.@@ -378,7 +380,7 @@ etoken <- getUserAccessTokenFromFbCookie case etoken of Right token -> setCredsRedirect (createCreds token)- Left msg -> fail msg+ Left msg -> liftIO $ fail msg -- Login routes used to forcefully require the user to login. dispatch "GET" ["login", "go"] = dispatch "GET" ["login", "go", ""]@@ -405,7 +407,7 @@ -- flimsy and sometimes the user landed on a blank page due -- to race conditions. ur <- getUrlRender- tm <- getRouteToParent + tm <- getRouteToParent query <- queryString <$> waiRequest let proceedUrl = ur $ tm $ fbcsR ["login", "back"] query' = [(a,b) | (a, Just b) <- query]@@ -520,9 +522,9 @@ case moldCode of Just code' | code == code' -> lift $ do -- We have a cached token for this code.- Just userId <- lookupSession sessionUserId- Just data_ <- lookupSession sessionToken- Just exptime <- lookupSession sessionExpires+ userId <- lookupSessionIO sessionUserId+ data_ <- lookupSessionIO sessionToken+ exptime <- lookupSessionIO sessionExpires return $ FB.UserAccessToken (FB.Id userId) data_ (read $ T.unpack exptime) _ -> do -- Get access token from Facebook.@@ -560,3 +562,7 @@ sessionUserId = "_FBCSU" sessionToken = "_FBCST" sessionExpires = "_FBCSE"++ lookupSessionIO x = lookupSession x >>= \case+ Just t -> return t+ Nothing -> liftIO $ fail "lookupSession could not find session"
yesod-auth-fb.cabal view
@@ -1,5 +1,5 @@ Name: yesod-auth-fb-Version: 1.9.1+Version: 1.10.0 Synopsis: Authentication backend for Yesod using Facebook. Homepage: https://github.com/psibi/yesod-auth-fb License: BSD3@@ -40,20 +40,20 @@ Library hs-source-dirs: src - Build-depends: base >= 4.9.0 && < 5+ Build-depends: base >= 4.11 && < 5 , yesod-core >= 1.6.1 , yesod-auth >= 1.6.1 , shakespeare >= 2.0 , wai , http-conduit >= 1.9- , text >= 0.7 && < 1.3- , transformers >= 0.1.3 && < 0.6- , yesod-fb >= 0.5.0- , fb >= 1.2.0+ , text >= 0.7+ , transformers >= 0.1.3+ , yesod-fb >= 0.5.3+ , fb >= 2.1.0 , conduit >= 1.3.0- , bytestring >= 0.9 && < 0.11+ , bytestring >= 0.9 , aeson >= 0.6- , time >= 1.0 && < 1.9+ , time >= 1.0 , unliftio , resourcet >= 1.2.0