diff --git a/src/components/Dialogs/LoginDialog/RegisterForm.js b/src/components/Dialogs/LoginDialog/RegisterForm.js index dcd844478..f26b7ee90 100644 --- a/src/components/Dialogs/LoginDialog/RegisterForm.js +++ b/src/components/Dialogs/LoginDialog/RegisterForm.js @@ -70,6 +70,7 @@ export default class RegisterForm extends React.Component { ); diff --git a/src/components/ReCaptcha/ReCaptcha.js b/src/components/ReCaptcha/ReCaptcha.js index 0d48a6934..827b1acbe 100644 --- a/src/components/ReCaptcha/ReCaptcha.js +++ b/src/components/ReCaptcha/ReCaptcha.js @@ -4,14 +4,20 @@ export default class ReCaptcha extends React.Component { static propTypes = { grecaptcha: React.PropTypes.object.isRequired, sitekey: React.PropTypes.string.isRequired, + theme: React.PropTypes.string, onResponse: React.PropTypes.func.isRequired }; + static defaultProps = { + theme: 'light' + }; + componentDidMount() { - this.props.grecaptcha.render( - this.container, - { sitekey: this.props.sitekey, callback: this.handleResponse } - ); + this.props.grecaptcha.render(this.container, { + sitekey: this.props.sitekey, + callback: this.handleResponse, + theme: this.props.theme + }); } handleResponse = (res) => { diff --git a/tasks/serve.js b/tasks/serve.js index 510d9f2e8..d9ceaa680 100644 --- a/tasks/serve.js +++ b/tasks/serve.js @@ -51,7 +51,11 @@ gulp.task('serve', () => { app .use(apiUrl, createWebApi(uw, { - recaptcha: false, + recaptcha: { + // Test keys from + // https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha-v2-what-should-i-do + secret: '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe' + }, server, secret: new Buffer('none', 'utf8') })) @@ -92,7 +96,12 @@ gulp.task('serve', () => { apiUrl, emoji: emojione.emoji, publicPath, - fs + fs, + recaptcha: { + // Test keys from + // https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha-v2-what-should-i-do + key: '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' + } })); uw.on('stopped', () => {