Skip to content
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

Unable to load script with V2 Enterprise #107

Open
afiqiqmal opened this issue Jul 7, 2022 · 2 comments
Open

Unable to load script with V2 Enterprise #107

afiqiqmal opened this issue Jul 7, 2022 · 2 comments

Comments

@afiqiqmal
Copy link

https://www.google.com/recaptcha/enterprise.js?render=KEY will give error. Any workaround?

@mvrlin
Copy link
Member

mvrlin commented Jul 7, 2022

https://www.google.com/recaptcha/enterprise.js?render=KEY will give error. Any workaround?

Hello, what's the error?

@afiqiqmal
Copy link
Author

If you have enterprise v2 key,

https://www.google.com/recaptcha/enterprise.js?render=KEY will give 400 bad request

To make it works with this library. i have to do some trick where you cannot put siteKey in nuxt.config.js

recaptcha: {
    siteKey: 'explicit',  // put anything beside key
    version: 2,
    mode: 'enterprise'
},

In component:

<recaptcha id="v2-normal"/>
await this.$recaptcha.init()
this.widgetId = this.$recaptcha.render('v2-normal', {
	sitekey: process.env.GOOGLE_RECAPTCHA_KEY
});

This will works with v2 enterprise.

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

No branches or pull requests

2 participants