Skip to content

Warn if <recaptcha /> component used with recaptcha v3 #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mrleblanc101 opened this issue Oct 26, 2021 · 1 comment · May be fixed by #99
Open

Warn if <recaptcha /> component used with recaptcha v3 #98

mrleblanc101 opened this issue Oct 26, 2021 · 1 comment · May be fixed by #99

Comments

@mrleblanc101
Copy link

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 mrleblanc101 changed the title Warn user if <recaptcha /> component found but using recaptcha v3 Warn user if <recaptcha /> component used with recaptcha v3 Oct 26, 2021
@mrleblanc101 mrleblanc101 changed the title Warn user if <recaptcha /> component used with recaptcha v3 Warn if <recaptcha /> component used with recaptcha v3 Oct 26, 2021
@mrleblanc101
Copy link
Author

mrleblanc101 commented Oct 26, 2021

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')
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant