diff --git a/README.md b/README.md index 19902a3..c36b047 100644 --- a/README.md +++ b/README.md @@ -23,17 +23,16 @@ Add the following JSON config snippet into your desired config, eg. `config/loca ```json "googleRecaptcha" : { "tokens" : { - "site_key": "", - "secret_key": "" + "site_key": "" }, "endpoint": "/api/ext/google-recaptcha/is-verify", "is_active": false } ``` -Replace the `site_key` & `secret_key` parameter with the site key & secret key provided by Google reCAPTCHA registration time. You can find your Captcha Site Key here: https://www.google.com/recaptcha/admin/. Setting `is_active` to `false` will disable the google reCAPTCHA extension at runtime. +Replace the `site_key` parameter with the site key & secret key provided by Google reCAPTCHA registration time. You can find your Captcha Site Key here: https://www.google.com/recaptcha/admin/. Setting `is_active` to `false` will disable the google reCAPTCHA extension at runtime. Valid site_key example: `"site_key": "6Lcn_Z0UAAAAAN4LdRSfM5eNd3LJ-xPfUtnV6Lud"` -Valid secret_key example: `"secret_key": "6Lcn_Z0UAAAAACodWP8oU9wcdVKatvQVBqklWA9c"` + ### 3. Register the Google reCAPTCHA extension Open up your `../vue-storefront/src/modules/index.ts` and add the following code. Adding it inside this file the registers the extension so it can be used in your Vue Storefront. ```js diff --git a/hooks/afterRegistration.ts b/hooks/afterRegistration.ts index 1c825b4..329222c 100644 --- a/hooks/afterRegistration.ts +++ b/hooks/afterRegistration.ts @@ -11,8 +11,8 @@ export function afterRegistration({ Vue, config, store, isServer }): any { Logger.warn('Google captcha module is disabled.', 'Google Recaptcha')(); return; } - if( !config.googleRecaptcha.tokens || !config.googleRecaptcha.tokens.site_key || !config.googleRecaptcha.tokens.secret_key ) { - Logger.warn('No google captcha config or captcha site_key or captcha secret_key found.', 'Google Recaptcha')(); + if( !config.googleRecaptcha.tokens || !config.googleRecaptcha.tokens.site_key ) { + Logger.warn('No google captcha config or captcha site_key found.', 'Google Recaptcha')(); return; } }