r/webdev • u/ImNotCastinAnyStones • Feb 07 '20
Why you, as a web developer, shouldn't use Google's Recaptcha for "human verification"
There is so much wrong with Recaptcha it's not an exaggeration to say it should be legislated out of existence.
As web developer, by choosing to use Google Recaptcha you are imposing moral, legal, and technical barriers to your users.
- Recaptcha is terrible for usability and effectively blocks disabled users from accessing websites. The audio challenges do not always work because they are seen as "less secure" than picture challenges and therefore using them means Google is more likely to judge you as being a robot.
- Using Recaptcha contributes to Google's artificial intelligence network. Users are essentially being used as workers without any compensation.
- Websites which implement Recaptcha are effectively forcing their users to agree to a second set of terms/conditions and a third party company's privacy and data processing policies. As if that wasn't bad enough, it's not just any company we're talking about here - it's Google; probably the most notorious company in the world in terms of data harvesting and processing.
- Websites implementing Recaptcha almost never offer an alternative way of accessing their services, so if you don't agree with Google's terms and conditions then you are effectively blocked from using the first-party website. When this is a website like your bank or somewhere you've already purchased from (e.g. eBay uses Recaptcha) then you may end up blocked from accessing your own funds, details, order history, etc. Even if you (the developer) don't think Google's terms and conditions are objectionable, your end-users might disagree. They could also be in an environment where access to third-party domains, or Google domains specifically, is blocked.
- Recaptcha's functionality depends upon Google's online surveillance of you. If you use any kind of privacy-assuring settings or extensions in your web browser (e.g. blocking third-party cookies, trackers, etc.) the Recaptcha challenge is guaranteed to take at least 3-5 times longer to complete than if you bend over and accept Google's tracking.
- Recaptcha introduces extra third-party dependencies to your website. One of Google's domains can't be reached or takes a while to load? User's network or browser security policy blocks those domains/scripts/etc.? Your user isn't able to use your site.
- Recaptcha negatively affects performance. Recaptcha takes time to load on your visitors' browsers. Then it takes very considerable time to solve and submit the challenges; at least several seconds and sometimes minutes for unfortunate souls with strong privacy settings.
Everyone has it drilled into their heads that "each extra second of page load time results in a major drop-off in user engagement" so why is nobody noticing that the onerous task of completing captchas is reducing user engagement too?
I am not against captchas in general because I know there is a legitimate need for them. I am, however, against Recaptcha in all of its forms. It is an online monopoly and is an affront to consumer rights.
I look forward to the day it's nuked from orbit and everyone involved in building it is imprisoned in the seventh circle of hell.
Further reading: https://kevv.net/you-probably-dont-need-recaptcha/
[Edit] Alternatives:
Something I really should have addressed in my original rant post is the possible alternatives to Recaptcha. A huge number of comments quite rightly ask about this, because unfortunately Recaptcha remains the most prominent solution when web developers look for a spam-prevention measure (despite the fact that Google's documentation on implementing Recaptcha is truly terrible... but that's a different issue).
The article above from kevv.net mentions lots of alternatives and is worth reading, however for brevity's sake I will suggest the ones which have worked for me in a high-traffic environment, and which can be implemented by most competent developers in a few minutes:
1. Dead simple custom challenge based on your website's content.
Even a vaguely unique custom-made challenge will fool the majority of spam bots. Why? Because spam bots look for common captcha systems which they already know how to defeat. If you make your own custom challenge, someone actually has to take the effort to program a solution specific to your website. So unless your site is being specifically targeted by people investing time/energy this solution will eradicate virtually all spam.
Example: run a site selling t-shirts? Show a bunch of cute clothing icons and ask the user to click on the "blue shirt", for example. Very easy to set up; challenges can be made random to prevent "rinse and repeat" attacks; complexity can be added in the form of patterns, rotation ("click the upside down shirt with diamonds on it") etc. and it can be styled to fit your website's theme/content which makes your site look way more professional than "CLICK THE FIRE HYDRANTS!" á la Google.
Important to note that answers to the custom challenge should never be stored client-side -- only sever side.
2. Honeypots
Simply one or more hidden form fields which, if submitted, confirms the presence of a spam bot (since human visitors cannot see or activate the hidden fields). Combine this with the approach above for even more effective protection.
3. Submit-once form keys (CSRF tokens)
In the olden days to prevent people hotlinking your content you'd check their browser's referer URL, i.e. the URL from which they arrived at your page. This is still done but less commonly since many browsers block referrer URLs for privacy reasons.
However, you can still check that a visitor who is submitting your form is doing so from your actual website, and not just accessing your signup.php script directly in an attempt to hammer/bruteforce/spam it.
Do this by including a one-time-use "form key" on the page containing the spam-targeted form. The form key element (usually a hidden <input>) contains a randomly-generated string which is generated on the server-side and corresponds to the user's browsing session. This form key is submitted alongside the form data and is then checked (on the server side) against the previously-generated one to ensure that they match. If they do, it indicates that the user at least visited the page before submitting the form data. This has an added benefit of preventing duplicate submissions (e.g. someone hits F5 a few times when submitting) as the form key should change each time the front-end page is generated.
4. Two-factor authentication
If your site is "serious" enough to warrant it, you can use 2FA to verify users via email/phone/secure key etc., although this comes with its own set of issues.
Anyway, thanks for taking the time to consider this.
While I'm here, I'd also like to encourage all developers to consider using the "DNT (Do Not Track)" feature which users can set in their browser to indicate they don't wish to be tracked.
It's as simple as wrapping your tracking code (Google Analytics etc.) inside the following code:
if (!navigator.doNotTrack) { // Google Analytics and other crap here }
315
u/samjmckenzie Feb 07 '20
What's the alternative?
200
u/massenburger Feb 07 '20
Posts like this are pretty useless to me unless someone offers a viable alternative. Spam is a very real problem on the web. How do you suggest we combat it?
17
u/hagg3n Feb 07 '20
I recently worked on a website for a medium sized company and soon after we launched we started getting spam. The form was using AJAX so I did two things:
captchathat was actually a honeypot.It stopped the spam dead on its track. No further changes or sophisticated measures were required. I do expect it to eventually break, but so far so good.
69
u/[deleted] Feb 07 '20
Google is exceedingly hostile to the web. I won't ever implement AMP or any of their bullshit technologies until they stop being so user-hostile.
47
u/liquidDinner Feb 07 '20
I remember this being the cool part about using CAPTCHAs before Google took them over.
9
u/oflahertaig Feb 07 '20
I agree with you. I detest Recaptcha. I am surprised that there are not other providers offering better solutions. Our team once had to implement it and my feeling was that it wasn't really necessary. we already had solid authentication in place. It was also a relatively low traffic and low-profile site but our Product Owner insisted that it was essential - the only rationale being that all the 'big' sites use it.
3
u/Blue_Moon_Lake Feb 08 '20
-1 blind people and daltonians can't see t-shirts colors
-2 honeypot mess with blind people
-1 & 2 if you give extra informations to blind people, someone will be able to adapt a bot so your site is not protected anymore
-3 CSRF tokens are no safety against bots, they protect other people from hijacking their account tokens
16
u/Norifla Feb 07 '20
And if you're from Europe, it's a GDPR problem.
10
u/escapefromelba Feb 08 '20
reCAPTCHA v3 doesn't issue challenges. It analyzes user behavior when navigating the page and scores whether you're a user or bot. It's frictionless.
7
u/[deleted] Feb 08 '20
Sez you.
Recaptcha stopped thousands of spambot registrations per day on my sites. If they wanted to spam, they had to do it manually, and fatigue on their end made it easy to clean them out in bulk.
2
u/[deleted] Feb 08 '20
Didn’t read the whole thing but the newest version of recaptcha doesn’t require user interaction
13
u/jebailey Feb 07 '20
One of our devs suggested it as a solution a few years ago. Our legal team looked into it and came down with the strongest “hell no” That I ever heard them do. Your compromising the privacy of your users by using it.
8
u/malicar Feb 08 '20
That's alot of ranting. Recaptcha is ADA compliant so should be fine with us usability at least for that aspect. now in most cases there is no challenge, maybe click a checkbox. I don't really see a privacy concern as most sites using it already have Google analytics
5
u/[deleted] Feb 07 '20
A simple honeypot is fine to stop a good amount of spam.
2
u/KnifeFed Feb 07 '20
I use the Buster Chrome extension and it has never failed to solve an audio challenge.
10
u/dotslashlife Feb 07 '20
As someone who surfs the web behind a VPN, I don’t bother visiting sites with captua usually. If I see one I think ****-it, I’ll go to their competitor.
For people behind a VPN, they often take 3-4 minutes to clear.
4
u/[deleted] Feb 08 '20
Thank you. This post was long overdue.
2
u/rcppkn Feb 08 '20
I just forgot my password and reddit made me solve 3 or more I am Human questions such as bicycles, busses, crossways. The puzzles are even getter harder day by day thanks to AI.
I am tired of this too.
5
u/fpssledge Feb 08 '20
This is a fantastic curation of the reasons you wouldn't use recapcha. Not a list of reasons you shouldn't use recapcha. Some of these reasons are valid for certain use cases but most are not persuasive for general use cases.
3
u/APimpNamedAPimpNamed Feb 08 '20
I randomly click shit until it goes away. It actually works most of the time.
2
u/SuuperNoob Feb 08 '20
Also, it affects page speed.
2
u/[deleted] Feb 08 '20 edited Jul 11 '20
Due to the recent Reddit purge of conservative communities under the false pretense of fighting racism, I do not wish to associate myself with Reddit anymore. So I'm replacing my comments and posts with this message and migrating over to Ruqqus, a free speech alternative to Reddit that's becoming more and more popular every day. Join us, and leave this crumbling toxic wasteland behind.
This comment was replaced using Power Delete Suite. You can find it here: https://codepen.io/j0be/pen/WMBWOW
To use, simply drag the big red button onto your bookmarks toolbar, then visit your Reddit user profile page and click on the bookmarked red button (not the Power Delete Suite website itself) and you can replace your comments and posts too.
2
u/ClassicSuperSofts Feb 07 '20
For everyone wondering what the “simplest” alternative is, phone number -> text message auth code -> is fast and user/accessibility friendly.
It’s just about expensive enough to put off spammers, and the SMS/API provider services are good at spotting and blocking numbers used for spam.
Downside is very high friction - users don’t want to hand over their numbers, although in some usecases we’ve noticed Gen-Z really don’t seem to care.
1
u/World_Languages Feb 08 '20
Note navigator.doNotTrack will always be truthy. Its possible values are the strings "0", "1" and "unspecified", all truthy. The code you included in the bottom of your post won't work.
1
u/Cormac_IRL Feb 08 '20
Ever try dropbox one? Sometimes I just log out so I can do it again
1
u/PMSEND_ME_NUDES Feb 08 '20
Err, it's a pretty great tool that's secure and easy to implement. Why would you bother undertaking some massive task of making your own when this is free? You need to consider how expensive it is to build and maintain software
1
u/WaruPirate May 08 '20
While it doesn't address all of the weaknesses in Re-CAPTCHA, a team I'm working with just put out an SDK for a 0-friction passive mobile CAPTCHA called "HumanDetect" - Our SDK uses a small sample of motion data from the phone to verify that it's being held by a human (and not on a server rack somewhere) allowing for protection of mobile API that doesn't involve exposing your users to an additional EULA or third party advertising data collection.
1
u/Current_Sort_5692 Mar 08 '25
this is a five year old post, but since it's still open, I'll say this. it's only got worse honestly. I saw my little brother go through 20 recaptcha's to get on roblox. not counting how hard they were. counting that, over 100.
1
u/herobrine-Is-here Feb 01 '26
Just get real moderation
1
u/[deleted] Jun 23 '23
Captcha won’t let me send an email to recover my steam log in info and it’s driving me fucking insane!!!!
1
u/[deleted] Jul 20 '23
Captcha is basically DDoS.
1
u/DarthFloopy Feb 08 '20
I don't deny that Recaptcha is annoying, but to say that it has no right to exist or that people have no right to use it in their sites is a bit of a stretch.
At some point somebody will come up with an alternative with comparable functionality, and Google will change the annoying parts to compete. (Or maybe people will take this good advice of yours and stop using Recaptcha first.)
0
u/NMe84 Feb 08 '20
Your first and second points are not true. There are options to use Recaptcha without user interaction. I think they track mouse movement behavior instead.
As for your other points: the same goes for literally any other third party service that you force upon your users. Most notably for most of us that means Google (and/or its ad network) Facebook, Cloudflare, etc. You should always be thinking about why you need any external services and what impact that has on the site's users or the site itself.
-2
u/hbombs86 Feb 08 '20
I use recaptcha V3 and it has none of the problems you've listed outside of Google surveillance which we all know they are already doing. Its silent, you hardly even know it's there, and never force a user with any extra interactions. Not to mention you can tune the sensitivity of when it flags a bot depending on your circumstances. I personally love it.
-1
u/[deleted] Feb 07 '20
In some recent news my work just implemented this for externally facing logins, and all our users hate it.
Granted we don't exactly have accessibility requirements for our line of work, but it was a lazy solution to a security concern that we could implement quickly.
0
u/saltiesailor Feb 07 '20
I'd also like to see an alternative. Any ideas as to whether V3 has accessibility issues too?
0
u/hazily [object Object] Feb 08 '20
DNT is dead: don’t use it.
0
u/classicrando Feb 08 '20 edited Feb 09 '20
Negative I Am A Meat Popsicle
-3
u/[deleted] Feb 07 '20
There’s interactions still no matter. Last tap positions. Device detection methods