hapi-recaptcha
v0.2.0
Published
Google's reCaptcha for hapi
Downloads
37
Maintainers
Readme
hapi_recaptcha
Google's reCaptcha for hapi
Usage
First load and register the plugin:
server.register(
[
{
register : require('hapi-recaptcha'),
options : {}
}
]
)
In the view
<!DOCTYPE html>
<html>
<head>
<title>reCaptcha</title>
{{{ captcha_script }}}
</head>
<body>
<form>
{{{ captcha_form }}}
</form>
</body>
</html>
Plugin Options
The following options are available when registering the plugin
- host - Google's recaptcha host. Default: https://www.google.com
- script - Default: '/recaptcha/api.js'
- verify - Default: '/recaptcha/api/siteverify'
- element - Default: 'g-recaptcha-response'
- data
- theme - Default: 'light'
- type - Default: 'image'
- size - Default: 'normal'
- tabindex - Default: 0