yesod-auth-fb-0.0: [PREVIEW] Authentication backend for Yesod using Facebook.

Yesod.Auth.FB

Synopsis

Documentation

authFacebookSource

Arguments

:: YesodAuth master 
=> Credentials

Your application's credentials.

-> Manager

HTTP connection manager.

-> [Permission]

Permissions to be requested.

-> AuthPlugin master 

Yesod authentication plugin using Facebook.

facebookLogin :: AuthRouteSource

Route for login using this authentication plugin.

facebookLogout :: AuthRouteSource

Route for logout using this authentication plugin. At the time of writing, Facebook's policies (https://developers.facebook.com/policy/) specified that the user needs to be logged out from Facebook itself as well.

getUserAccessToken :: MonadIO mo => GGHandler sub master mo (Maybe UserAccessToken)Source

Get the Facebook's user access token from the session. Returns Nothing if it's not found (probably because the user is not logged in via yesod-auth-fb). Note that the returned access token may have expired, we recommend using hasExpired and isValid.

setUserAccessToken :: MonadIO m => UserAccessToken -> GGHandler sub master m ()Source

Set the Facebook's user access token on the user's session. Usually you don't need to call this function, but it may become handy together with extendUserAccessToken.