reCAPTCHA by FriendsOfFlarum

License Latest Stable Version Downloads

Extiverse

Increase your forum's security with Google reCAPTCHA. Original by @sijad.

screenshot

Changes from Sijad

  • Moved reCAPTCHA logic into its own component

  • Added Invisible reCAPTCHA

    invisible recaptcha

Installation

Use Bazaar or install manually with composer:

composer require fof/recaptcha

Your extension settings from sijad/flarum-ext-recaptcha should be migrated when you enable the extension for the first time.

Updating

composer update fof/recaptcha

Links

OpenCollective GitHub

An extension by FriendsOfFlarum.

    a month later
    5 months later
    21 days later

    I think this has to do with Google forcing an asynchronous loading of the Recaptcha library. Depending on the circumstances, if you can load Flarum and open the signup modal faster than the captcha library loads, and the page will error.

    I scanned the recaptcha docs but couldn't find how they suggest waiting for their script to load.

    Removing the async on the script tag doesn't seem to solve it, because that script then queues another async script.

    Maybe we could just catch the exception to grecaptcha.render() and retry a few seconds later ?

    EDIT: opened an issue for it FriendsOfFlarum/recaptcha4

    • [deleted]

    Or, perhaps simplify the extension with an alternative to reCAPTCHA, such as a check box with a dynamically generated ID that can't be auto populated by bots ?

      [deleted] I don't think this would simplify the extension. Using an external service is what makes it simple.

      Also it would no longer be the recaptcha extension if it doesn't integrate recaptcha 😇

      This could be made as a new extension though. It's good to have options.

        • [deleted]

        clarkwinkelmann This could be made as a new extension though. It's good to have options.

        Should have worded that better - that's what I actually meant but typed something else ! I may even develop this myself as it's one less call to an external source.

        Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify): failed to open stream: Connection timed out in /www/wwwroot/support.cards.farm/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Post.php on line 72

        Fatal error: Uncaught Zend\HttpHandlerRunner\Exception\EmitterException: Output has been emitted previously; cannot emit response in /www/wwwroot/support.cards.farm/vendor/zendframework/zend-httphandlerrunner/src/Exception/EmitterException.php:23 Stack trace: #0 /www/wwwroot/support.cards.farm/vendor/zendframework/zend-httphandlerrunner/src/Emitter/SapiEmitterTrait.php(39): Zend\HttpHandlerRunner\Exception\EmitterException::forOutputSent() #1 /www/wwwroot/support.cards.farm/vendor/zendframework/zend-httphandlerrunner/src/Emitter/SapiEmitter.php(26): Zend\HttpHandlerRunner\Emitter\SapiEmitter->assertNoPreviousOutput() #2 /www/wwwroot/support.cards.farm/vendor/zendframework/zend-httphandlerrunner/src/RequestHandlerRunner.php(97): Zend\HttpHandlerRunner\Emitter\SapiEmitter->emit(Object(Flarum\Api\JsonApiResponse)) #3 /www/wwwroot/support.cards.farm/vendor/flarum/core/src/Http/Server.php(46): Zend\HttpHandlerRunner\RequestHandlerRunner->run() #4 /www/wwwroot/support.cards.farm/public/index.php(22): Flarum\Http\Server->listen( in /www/wwwroot/support.cards.farm/vendor/zendframework/zend-httphandlerrunner/src/Exception/EmitterException.php on line 23