The existing GoogleEmail2 auth did that:
- Acquire user access token with offline access
- Use token to acquire user's profile
- Build `Creds` with user's email as `ident` and the other profile
details as stringy key-value pairs in `credsExtra`
This wasn't enough for me, for several reasons:
- Access token was not saved after authentication. If we request 'offline'
token why not to have a way of using it later.
- Stringy key-value profile is not nice and `credsExtra` can be accessed
only from `getAuthId`
- I might want to request the profile after authentication process
So I've added the needed features.
- The access token is saved in a session
- There is a `Person` type with `FromJSON` instance and `getPerson`
can be used to acquire it from `HandlerT`
|
||
|---|---|---|
| .. | ||
| Yesod | ||
| .gitignore | ||
| auth2.hs | ||
| browserid.hs | ||
| ChangeLog.md | ||
| LICENSE | ||
| openid.hs | ||
| persona_sign_in_blue.png | ||
| README.md | ||
| Setup.lhs | ||
| yesod-auth.cabal | ||
yesod-auth
This package provides a pluggable mechanism for allowing users to authenticate with your site. It comes with a number of common plugins, such as OpenID, BrowserID (a.k.a., Mozilla Persona), and email. Other packages are available from Hackage as well. If you've written such an add-on, please notify me so that it can be added to this description.
- yesod-auth-account: An account authentication plugin for Yesod
- yesod-auth-hashdb: The HashDB module previously packaged in yesod-auth, now with stronger, but compatible, security.
- yesod-auth-bcrypt: An alternative to the HashDB module.