diff --git a/.travis.yml b/.travis.yml index aaf414d4e..b60270840 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,11 @@ env: - CLOUDDATA_HOST_VAR=CLOUDDATA_HOST_$TRAVIS_BRANCH - CLOUDDATA_HOST=${!CLOUDDATA_HOST_VAR} - CLOUDDATA_HOST=${CLOUDDATA_HOST:-$CLOUDDATA_HOST_STAGING} + - RECAPTCHA_SITE_KEY_master=6LeRbUwUAAAAAFYhKgk3G9OKWqE_OJ7Z-7VTUCbl + - RECAPTCHA_SITE_KEY_STAGING=6LfukK4UAAAAAFR44yoZMhv8fj6xh-PMiIxwryG3 + - RECAPTCHA_SITE=RECAPTCHA_SITE_KEY_$TRAVIS_BRANCH + - RECAPTCHA_SITE_KEY=${!RECAPTCHA_SITE_KEY_VAR} + - RECAPTCHA_SITE_KEY=${RECAPTCHA_SITE_KEY:-$RECAPTCHA_SITE_KEY_STAGING} - ROOT_URL_master=https://scratch.mit.edu - ROOT_URL_STAGING=https://scratch.ly - ROOT_URL_VAR=ROOT_URL_$TRAVIS_BRANCH diff --git a/src/components/join-flow/email-step.jsx b/src/components/join-flow/email-step.jsx index 30db18a5d..4e2b28d57 100644 --- a/src/components/join-flow/email-step.jsx +++ b/src/components/join-flow/email-step.jsx @@ -40,7 +40,7 @@ class EmailStep extends React.Component { this.widgetId = this.grecaptcha.render(this.captchaRef, { callback: this.captchaSolved, - sitekey: '' + sitekey: process.env.RECAPTCHA_SITE_KEY }, true); } @@ -145,7 +145,7 @@ class EmailStep extends React.Component {
diff --git a/webpack.config.js b/webpack.config.js index 3118a4bb5..a2fe4fcbc 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -173,6 +173,8 @@ module.exports = { new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"' + (process.env.NODE_ENV || 'development') + '"', 'process.env.API_HOST': '"' + (process.env.API_HOST || 'https://api.scratch.mit.edu') + '"', + 'process.env.RECAPTCHA_SITE_KEY': '"' + + (process.env.RECAPTCHA_SITE_KEY || '6Lf6kK4UAAAAABKTyvdSqgcSVASEnMrCquiAkjVW') + '"', 'process.env.ASSET_HOST': '"' + (process.env.ASSET_HOST || 'https://assets.scratch.mit.edu') + '"', 'process.env.BACKPACK_HOST': '"' + (process.env.BACKPACK_HOST || 'https://backpack.scratch.mit.edu') + '"', 'process.env.CLOUDDATA_HOST': '"' + (process.env.CLOUDDATA_HOST || 'clouddata.scratch.mit.edu') + '"',