Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ncaq/yesod-recaptcha2
recaptcha2 for yesod
https://github.com/ncaq/yesod-recaptcha2
google haskell recapcha yesod
Last synced: 29 days 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 (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-02-13T20:11:50.000Z (11 months ago)
- Last Synced: 2024-04-26T00:31:00.351Z (9 months 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
[![Hackage](https://img.shields.io/hackage/v/yesod-recaptcha2.svg)](https://hackage.haskell.org/package/yesod-recaptcha2)
[![yesod-recaptcha2 on Stackage LTS](http://stackage.org/package/yesod-recaptcha2/badge/lts)](http://stackage.org/lts/package/yesod-recaptcha2)
[![test](https://github.com/ncaq/yesod-recaptcha2/actions/workflows/test.yml/badge.svg)](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
~~~