recaptcha-module icon indicating copy to clipboard operation
recaptcha-module copied to clipboard

Warn if `<recaptcha />` component used with recaptcha v3

Open mrleblanc101 opened this issue 4 years ago • 1 comments

Hi, It would be good if the plugin would warn in the console or break the build if the dev use a <recaptcha /> component when using recaptcha v3. Otherwise we get ERROR for site owner: Invalid key type which is confusing and hard to debug.

mrleblanc101 avatar Oct 26 '21 17:10 mrleblanc101

Maybe something like this inside recaptcha.vue:

export default {
    ...
    mounted() {
        if(this.$.recaptcha.version === 3) {
            console.warn('`<recaptcha />` component should only be used with v2')
        }
    }
}

mrleblanc101 avatar Oct 26 '21 17:10 mrleblanc101