Easiest way to integrate captcha's into Symfony2 FOSUserBundle registration?

℡╲_俬逩灬. 提交于 2019-12-06 02:57:54

问题


I'm using Symfony2 and the FOSUserBundle to manage registration and logins. I'd like to add a captcha system. Is there are pre-existing bundle or tutorial on this?

Of course, I could try to roll my own using Google re-captcha. In that case, is Google reCaptcha a good choice, or should I use some other API?


回答1:


There are indeed a bundles for that, take a look at:

CaptchaBundle

Or

EWZRecaptchaBundle

Both got (most likely) all the documentation you need added in the README.md file or extended documentation.




回答2:


I just wrote a tiny bundle called caitcha-bundle.

According to this part of the fos user bundle documenation implementation should be quite easy because you only have to activate the caitcha bundle and add $builder->add('caitcha', 'caitcha'); to the form type.

Because captcha images and any other approaches that require some user interaction which is not related to the form itself are very annoying in my optinion, I tried to implement an invisible bot protection by using the honeypot method and a check for the time it took to fill in the form. It works well for my use cases but still has to be extended by more checks I suppose. I would appreciate any suggestions to improve this bundle.



来源:https://stackoverflow.com/questions/13238348/easiest-way-to-integrate-captchas-into-symfony2-fosuserbundle-registration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!