| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Yesod.Auth.OAuth2.Google
Description
OAuth2 plugin for http://www.google.com
- Authenticates against Google
- Uses Google user id or email as credentials identifier
- Returns given_name, family_name, email, and avatar_url as extras
Note: This may eventually replace Yesod.Auth.GoogleEmail2. Currently it provides the same functionality except that GoogleEmail2 returns more profile information.
- oauth2Google :: YesodAuth m => Text -> Text -> AuthPlugin m
- oauth2GoogleScoped :: YesodAuth m => [Text] -> Text -> Text -> AuthPlugin m
- oauth2GoogleScopedWithCustomId :: YesodAuth m => (GoogleUser -> AccessToken -> Creds m) -> [Text] -> Text -> Text -> AuthPlugin m
- googleUid :: GoogleUser -> AccessToken -> Creds m
- emailUid :: GoogleUser -> AccessToken -> Creds m
- module Yesod.Auth.OAuth2
Documentation
Arguments
| :: YesodAuth m | |
| => Text | Client ID |
| -> Text | Client Secret |
| -> AuthPlugin m |
Auth with Google
Requests openid and email scopes and uses email as the
identifier.Creds
Arguments
| :: YesodAuth m | |
| => [Text] | List of scopes to request |
| -> Text | Client ID |
| -> Text | Client Secret |
| -> AuthPlugin m |
Auth with Google
Requests custom scopes and uses email as the identifier.Creds
oauth2GoogleScopedWithCustomId Source #
Arguments
| :: YesodAuth m | |
| => (GoogleUser -> AccessToken -> Creds m) | A function to generate the credentials |
| -> [Text] | List of scopes to request |
| -> Text | Client ID |
| -> Text | Client secret |
| -> AuthPlugin m |
googleUid :: GoogleUser -> AccessToken -> Creds m Source #
Build a using the user's google-uid as the identifierCreds
emailUid :: GoogleUser -> AccessToken -> Creds m Source #
Build a using the user's email as the identifierCreds
module Yesod.Auth.OAuth2