Skip to content

Commit cd95189

Browse files
committed
Merge pull request dozoisch#18 from Jimdo/allow-stoken
Allow to set the stoken parameter
2 parents 961f309 + 3a0f139 commit cd95189

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Other properties can be used to customised the rendering.
5656
| type | enum | *optional* `image` or `audio` The type of initial captcha *(__defaults:__ image)*
5757
| tabindex | number | *optional* The tabindex on the element *(__default:__ 0)*
5858
| onExpired | func | *optional* callback when the challenge is expired and has to be redone by user. By default it will call the onChange with null to signify expired callback. |
59+
| stoken | string | *optional* set the stoken parameter, which allows the captcha to be used from different domains, see [reCAPTCHA secure-token] |
5960

6061
## Component API
6162

@@ -104,3 +105,4 @@ render(
104105
[docs]: https://developers.google.com/recaptcha
105106
[js_api]: https://developers.google.com/recaptcha/docs/display#js_api
106107
[rb]: https://github.com/react-bootstrap/react-bootstrap/
108+
[reCAPTCHA secure-token]: https://developers.google.com/recaptcha/docs/secure_token

src/recaptcha.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const ReCAPTCHA = React.createClass({
1111
tabindex: PropTypes.number,
1212
onExpired: PropTypes.func,
1313
size: PropTypes.oneOf(["compact", "normal"]),
14+
stoken: PropTypes.string,
1415
},
1516

1617
getInitialState() {
@@ -57,6 +58,7 @@ const ReCAPTCHA = React.createClass({
5758
tabindex: this.props.tabindex,
5859
"expired-callback": this.handleExpired,
5960
size: this.props.size,
61+
stoken: this.props.stoken,
6062
});
6163
this.setState({
6264
widgetId: id,

0 commit comments

Comments
 (0)