简体   繁体   English

带有 ng-recaptcha 的 Google Recaptcha v3 无法用于生产

[英]Google Recaptcha v3 with ng-recaptcha not working on production

I'm using ng-recaptcha module ( https://www.npmjs.com/package/ng-recaptcha ) on an Angular application to protect a register page.我在 Angular 应用程序上使用 ng-recaptcha 模块( https://www.npmjs.com/package/ng-recaptcha )来保护注册页面。 It was working perfectly fine on a preproduction machine, but when we've moved the application to the production one, the register page component throws the following error (translated from Spanish, it won't be exact as the English version):它在预生产机器上工作得非常好,但是当我们将应用程序移动到生产机器时,注册页面组件会引发以下错误(从西班牙语翻译,它与英文版本不完全相同):

The resource on “https://www.google.com/recaptcha/api.js?render=***GOOGLE_RECAPTCHA_WEB_KEY***&onload=ng2recaptchaloaded” 
was blocked due to a discordance of the MIME type (“text/html”) (X-Content-Type-Options: nosniff)

I've been googling around and I found some posts telling that the problem could be a wrong Google API key.我一直在谷歌搜索,发现一些帖子告诉我问题可能是错误的 Google API 密钥。 I've generated a new pair from Google's panel but the error persists.我从 Google 的面板生成了一对新的,但错误仍然存在。

Any clue, please?请问有什么线索吗? Many thanks!非常感谢!

After some tests, we discovered that the problem was that the keys generated from the Google panel were not working.经过一些测试,我们发现问题在于从 Google 面板生成的密钥不起作用。 Generating a new pair from another account made the application work perfectly again.从另一个帐户生成新的配对使应用程序再次完美运行。 We'll investigate a little about this when we have time, but we think it has to do with the fact that we've cancelled recently the G-Suite subscription on this account...有时间我们会对此进行一些调查,但我们认为这与我们最近取消了此帐户的 G-Suite 订阅有关...

Well, at least now we know it has nothing to do with ng-recaptcha module or the application itself.好吧,至少现在我们知道它与ng-recaptcha模块或应用程序本身无关。

Cheers!干杯!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 ng-recaptcha 将 Google reCaptcha v3 集成到 Angular 应用程序中 - Integrating Google reCaptcha v3 into Angular app with ng-recaptcha 内联块在 ng-recaptcha 中留下边界 - Inline block leaves a border in ng-recaptcha reCAPTCHA v3 不工作 angular 6 - 执行错误 - reCAPTCHA v3 not working angular 6 - error executing ng-recaptcha ERR:错误:“未捕获(承诺):[对象空]” - ng-recaptcha ERR: Error: "Uncaught (in promise): [object Null]" 如何模拟`<re-captcha> ` 在使用反应形式的 ng-recaptcha V2 的组件的单元测试中?</re-captcha> - How-to mock `<re-captcha>` in unit-test for a component using ng-recaptcha V2 in a reactive-form? 在 angular firebase 应用程序中重置 google reCaptcha v3 - Reset google reCaptcha v3 in angular firebase application 在 cypress 测试中模拟/存根/忽略谷歌 recaptcha v3 请求 - mock/stub/ignore google recaptcha v3 requests on cypress tests Angular 6 - 安装 ng-recaptcha 给出错误 TS1005: ';' 预期的 - Angular 6 - Installing ng-recaptcha gives error TS1005: ';' expected reCAPTCHA v3网络密集型Web应用程序 - reCAPTCHA v3 network intensive web applications Angular recaptcha v3,代码显示错误,无法执行该功能 - Angular recaptcha v3, code is showing error, not able to execute the function
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM