-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add invisible_captcha to user registration #333
base: main
Are you sure you want to change the base?
Conversation
I love the idea of including this, but I'm on the fence about having it turned on by default, and with no obvious way to disable it. Could we make a config option that would allow devs to toggle it on or off via an initializer or something? @andrewculver @gazayas @kaspth, what do y'all think? |
Yeah, I think something like |
Will see to it when I'm back from 🏝️ |
@julianrubisch I can also take this over, if you'd rather enjoy your vacation without worrying about it 😄 |
Suit yourself, but please don't feel obliged! |
0383b69
to
e9fe750
Compare
@julianrubisch I didn't get to this if you're back from vacation and want to follow it up. I can still take a look too! |
I pulled this down and have run through signup a few times trying to trigger this and I seem to be getting inconsistent results. I'm going to the signup page and then inspecting the form and disabling the CSS rules that hide the honeypot field. Then I'm putting something in the honeypot, filling out the rest of the form, and hitting the "Sign Up" button. Sometimes the registration works like normal and the Other times it seems that (^ That's after clicking "Sign Up" once.) When this happens I can see an error in the rails console that says:
Weirdly the console also says that the request was successful:
I can see in the browser dev tools that it does return a And there's an error in the browser console that says:
If I then click "Sign Up" again the form gets blanked out (it loses info I filled in) and I get an error saying:
So I think something isn't quite right about the integration. I have no idea why it's blocking sign up sometimes, but not all the times when I fill out the honeypot. I was also reading through the docs for From the docs:
I think that means that if someone were to deploy to Heroku (for instance) and have their app configured to run on multiple dynos that the captcha would be flaky and might even trigger false positives (that is, block legitimate users from signing up). Some discussion of that possibility in this issue. There's also a whole section in the docs about running multiple Rails instances. I think we'd want to have that bit of configuration in the repo and setup to be automatically enabled if the I wouldn't be surprised if the flakiness I'm seeing is related to one of these issues. It also looks like adding this breaks a few tests, so we'll need to figure out how to either disable this in testing, or we'll need to modify tests to accommodate. Still love the idea of having this included and easy to turn on for people who want it. |
In my latest BT installation I noticed some bot signups.
I thought that installing invisible_captcha would be a sensible default for all apps.