yesod-auth 0.1.0 → 0.1.1
raw patch · 2 files changed
+10/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Yesod.Helpers.Auth2.Facebook: facebookUrl :: AuthRoute
Files
- Yesod/Helpers/Auth2/Facebook.hs +9/−0
- yesod-auth.cabal +1/−1
Yesod/Helpers/Auth2/Facebook.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE QuasiQuotes #-} module Yesod.Helpers.Auth2.Facebook ( authFacebook+ , facebookUrl ) where import Yesod@@ -9,6 +10,9 @@ import Data.Object (fromMapping, lookupScalar) import Data.Maybe (fromMaybe) +facebookUrl :: AuthRoute+facebookUrl = PluginR "facebook" ["forward"]+ authFacebook :: YesodAuth m => String -- ^ Application ID -> String -- ^ Application secret@@ -18,6 +22,11 @@ AuthPlugin "facebook" dispatch login where url = PluginR "facebook" []+ dispatch "GET" ["forward"] = do+ tm <- getRouteToMaster+ render <- getUrlRender+ let fb = Facebook.Facebook cid secret $ render $ tm url+ redirectString RedirectTemporary $ Facebook.getForwardUrl fb perms dispatch "GET" [] = do render <- getUrlRender tm <- getRouteToMaster
yesod-auth.cabal view
@@ -1,5 +1,5 @@ name: yesod-auth-version: 0.1.0+version: 0.1.1 license: BSD3 license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>