albertcht / invisible-recaptcha

An invisible reCAPTCHA package for Laravel, Lumen, CI or native PHP.
MIT License
603 stars 163 forks source link

not works with laravel auth #56

Closed RolandVerner closed 6 years ago

RolandVerner commented 6 years ago

i try to put the recaptha to registration and that not works with it

albertcht commented 6 years ago

Hi @rolandverner ,

Please provide more detail information for clarifying your question. For example, the web console message or the partial code how you use this package in your view.

RolandVerner commented 6 years ago

image image image image

And nothing looks like only reload the page

image

albertcht commented 6 years ago

Hi @rolandverner ,

According to your screenshots, the captcha has been successfully loaded because the badge logo is shown on your right-bottom side.

You can dump your form data on the backend to check if there's a g-recaptcha-response field. If yes, that means the captcha works properly.

RolandVerner commented 6 years ago

it still not works on laravel auth I reinstall laravel and invisible recaptha and it not help, on other forms it works great

RolandVerner commented 6 years ago

Can be that it have some conflict with other packages?

albertcht commented 6 years ago

There's a full laravel boilerplate project you can refer to: https://github.com/Labs64/laravel-boilerplate

That boilerplate project integrates this package in its registration page and use laravel auth as well.

alariva commented 6 years ago

Be aware that captcha error is silent if validation messages are not printed.

@captcha
@if ($errors->has('g-recaptcha-response'))
    <span class="help-block">
        <strong>{{ $errors->first('g-recaptcha-response') }}</strong>
    </span>
@endif

So maybe is just the captcha check what is failing, possibly due to bad site/secret key. It happened to me (as silly as it seems) that before copy-paste my double-click selection excluded the very last character (for example a - symbol), and it can pass unnoticed. Make sure you are performing tests with the very right keys configured.