Spring security 带Spring Security的Recaptcha
不幸的是,我无法在Spring security 带Spring Security的Recaptcha,spring-security,recaptcha,Spring Security,Recaptcha,不幸的是,我无法在localhost上为我的应用程序运行Recaptcha。我继续听介绍。我为localhost和127.0.0.1创建了一个网站密钥和密码 在我的html头中有一个脚本src: `<script src="https://www.google.com/recaptcha/api.js"></script>` `` recaptcha的div如下所示: `<div class="g-recaptcha" data-sitekey="6Le_L
localhost
上为我的应用程序运行Recaptcha。我继续听介绍。我为localhost
和127.0.0.1
创建了一个网站密钥和密码
在我的html头中有一个脚本src:
`<script src="https://www.google.com/recaptcha/api.js"></script>`
``
recaptcha的div如下所示:
`<div class="g-recaptcha" data-sitekey="6Le_LZgUAAAAAKlzsoEBOOQvCOqIr7r65eiN4bd4">recaptcha</div>`
`<span id="captchaError" class="alert alert-danger " style="display:none"></span>`
`recaptcha`
``
但我总是在使用无效的网站密钥时出错:
我能做什么?谢谢你的提示。我知道它可以工作,而且在本地主机上也可以工作。首先,如果您创建一个新的API密钥,我想它可能需要几次才能真正激活 在我的页面上,我现在做了以下工作:
`<script src='https://www.google.com/recaptcha/api.js?render=6Le_LZgUAAAAAM5uw_9hujkS6SjBWLNVkQOvewWf'></script>`
``
我删除了
我遇到的另一个解决方案是使用recaptcha spring boot starter
。它极大地减少了我的代码,但我只使用Recaptcha V2运行了它。但这对我来说也没关系:
我的缺点是,我应该进行彻底的研究,是的,找到解决方案很好。它现在似乎起作用了。我认为您使用的是recaptcha的v3,如果您希望选中该复选框,那么您必须使用v2。plz不共享您的私钥,甚至不共享您的公钥。它们只供你使用,应该保密。嗨,高尔佐,谢谢你的回复。密钥将在以后交换,目前它们仅用于本地。但是谢谢你的提示。:-)是的,我正在使用V3