https://github.com/ncaq/yesod-recaptcha2
recaptcha2 for yesod
https://github.com/ncaq/yesod-recaptcha2
google haskell recapcha yesod
Last synced: 11 months ago
JSON representation
recaptcha2 for yesod
- Host: GitHub
- URL: https://github.com/ncaq/yesod-recaptcha2
- Owner: ncaq
- License: mit
- Created: 2017-06-19T07:55:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-02-13T20:11:50.000Z (over 2 years ago)
- Last Synced: 2024-04-26T00:31:00.351Z (about 2 years ago)
- Topics: google, haskell, recapcha, yesod
- Language: Haskell
- Size: 70.3 KB
- Stars: 4
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yesod-recaptcha2
[](https://hackage.haskell.org/package/yesod-recaptcha2)
[](http://stackage.org/lts/package/yesod-recaptcha2)
[](https://github.com/ncaq/yesod-recaptcha2/actions/workflows/test.yml)
It support new Google [reCAPTCHA(v2, v3)](https://www.google.com/recaptcha/about/) for [yesod-form](https://hackage.haskell.org/package/yesod-form) instead [yesod-recaptcha](https://hackage.haskell.org/package/yesod-recaptcha) beacuse original yesod-recaptcha is dead.
And it support reCAPTCHA new version(v2, v3).
# Example
## Setup
~~~hs
import Yesod.ReCaptcha2
~~~
~~~hs
instance YesodReCaptcha App where
reCaptchaSiteKey = pure "foo"
reCaptchaSecretKey = pure "bar"
reCaptchaLanguage = pure Nothing
~~~
## Append to applicative form
~~~hs
buildForm :: Form MyForm
buildForm = renderDivs $ MyForm <$>
areq textField "foo" Nothing <*
reCaptcha
~~~