Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Recaptcha Laravel Package

fruitcakestudio/recaptcha

Laravel integration for Google reCAPTCHA. Adds validation rules, Blade directives and middleware to protect forms and routes from bots and spam, with support for reCAPTCHA v2 and v3 plus configurable keys, score thresholds and error messages.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package is a thin Laravel wrapper around Google's reCAPTCHA siteverify endpoint: a service provider, a config file for site/secret keys, a Blade/helper surface for rendering the widget, and a custom recaptcha validation rule. Its architectural footprint is small and non-invasive — it does not touch persistence, queues, or the request lifecycle beyond validation.
  • Fit is therefore high in principle (composable, opt-in, stateless) but low in practice: with 16 stars, zero dependents, and a final release dated 2017-07-11, this is effectively an abandoned single-maintainer artifact. Adopting it means adopting an unowned dependency for a security-adjacent control.
  • Critically, the package predates reCAPTCHA v3 (2018) and Laravel package auto-discovery (5.5, Aug 2017). It almost certainly targets v2 checkbox/invisible flows and manual provider registration. Modern Laravel (9–11) support is unverified and unlikely to have been tested.
  • Because the entire value proposition is one outbound HTTP POST plus a validation rule, the build-vs-buy calculus tilts sharply toward build — a ~50–100 line in-house implementation using Laravel's Http client and a Rule object would be better owned, better tested, and version-current.

Integration feasibility

  • Technically trivial to integrate: composer require, publish config, add keys to env, register the provider if auto-discovery is absent, attach the rule to form requests. Estimated effort: under a day for a spike.
  • The real cost is not integration but validation: confirming the provider boots cleanly on the target Laravel major, that the rule's error messaging is translatable, that Guzzle version constraints resolve against the app's existing HTTP stack, and that no deprecated framework APIs (config(), container bindings, Str/Arr helpers) break.
  • Composer resolution risk is moderate: a 2017 package may pin illuminate/support or guzzlehttp/guzzle to ranges that conflict with current versions, forcing --ignore-platform-reqs or a fork.

Technical risk

Risk Severity Likelihood Notes
Unmaintained / no security patches High Certain Last commit ~2017; no CVE response path
No reCAPTCHA v3 or Enterprise support High Certain Blocks modern risk-scoring strategy
Laravel version incompatibility Medium High Untested beyond ~5.4/5.5
Secret key handling posture Medium Medium Verify no logging/echo of secret
Google API deprecation of v2 Medium Low-Medium Still live, but roadmap risk
Single-maintainer abandonment High Certain Already realized
  • Supply-chain surface is small and MIT-licensed, so legal/procurement is not a blocker — the blocker is lifecycle risk.

Key questions

  1. Which reCAPTCHA product do we actually need — v2 checkbox, v2 invisible, v3 score-based, or Enterprise? If v3, this package is disqualified outright.
  2. What Laravel and PHP versions must be supported across the fleet over the next 24 months?
  3. What is the fail-open vs. fail-closed policy when Google's endpoint is slow or unreachable?
  4. Who owns this code path when Google changes behavior and the upstream repo is dormant?
  5. Is a fork-and-vendor acceptable, or does policy require a maintained upstream or in-house code?
  6. Are there compliance or accessibility requirements (WCAG) that constrain the widget choice?

Integration Approach

Stack fit

  • Assumes a Laravel monolith (or a Laravel-based API with a server-rendered form layer). Fits cleanly behind Form Requests and Laravel's validator.
  • Poor fit for decoupled SPA/mobile clients that need token verification at an API gateway, and for multi-tenant apps where per-tenant site/secret keys must be resolved at runtime — the 2017-era config model is single-key, env-driven.
  • Does not fit service-mesh or edge-verification architectures; verification is an in-process outbound call.

Migration path

  1. Spike (2–3 days): install in a scratch branch on the oldest and newest supported Laravel majors; confirm provider boot, rule registration, config publish, and a live end-to-end verification against Google's test keys.
  2. Abstract (3–5 days): define an internal CaptchaVerifier contract with a single verify(string $token, ?string $ip): Result method. Bind the package's behavior behind it, or skip the package entirely and implement the contract directly against siteverify.
  3. Cutover: keep the contract as the stable seam so the implementation (package, in-house, or v3 provider) is swappable without touching call sites.
  4. Decommission: if the spike surfaces version conflicts, abandon the package early — the sunk cost is days, not weeks.
  • Recommended path in most cases: skip the dependency and implement the ~50-line verifier in-house, using the package only as a reference implementation for endpoint parameters and error-code mapping.

Compatibility

  • Verify Composer constraints against illuminate/support, illuminate/validation, and guzzlehttp/guzzle. A conflict here is the most likely hard stop.
  • Confirm auto-discovery absence is handled with an explicit providers entry (and that the entry is removed cleanly if reverted).
  • Check that the validation rule integrates with Laravel's Rule/ValidationRule contracts; older string-based rule resolution still works but lacks type safety and testability.
  • Confirm config caching (php artisan config:cache) is safe — a common failure point for packages that read env at runtime.

Sequencing

  • Run this as a parallel, low-priority workstream, not on the critical path. It gates only the forms that need bot mitigation.
  • Do the abstraction contract first if multiple teams consume CAPTCHA; this decouples the vendor decision from delivery timelines.
  • If reCAPTCHA v3 is on the roadmap within 12 months, sequence directly to a v3-capable implementation and treat this package as out of scope entirely.

Operational Impact

Maintenance

  • Effectively zero upstream maintenance. No release in ~8 years, no security response, and issues/PRs on the repository are dormant. All maintenance burden transfers to the adopting team.
  • Because the code is tiny, in-house maintenance cost is genuinely low — but it must be scheduled, not assumed. Budget a periodic review keyed to Google API changes and Laravel major upgrades.
  • Recommend vendoring or forking with an internal owner and a documented patch policy if the package is retained for any reason.

Support

  • No vendor support, no SLA, no security contact. Internal on-call owns every failure.
  • Documentation is minimal and 2017-era; expect to reverse-engineer behavior from source during incidents.
  • Google's own reCAPTCHA documentation is the real reference and is the authority on error codes, token TTL, and quota behavior — plan to rely on it directly.

Scaling

  • Negligible scaling concern on our side: verification is stateless and outbound-only, one HTTPS round trip per submission.
  • The scaling constraint is Google's, not ours: per-key quotas, latency variance (typically tens to low hundreds of ms), and regional reachability. Under traffic spikes, added latency lands on the form-submission path.
  • Mitigations: short HTTP timeout (2–3s), a defined fail-open/fail-closed policy, and — if volume is high — verification only on high-risk actions rather than every request.

Failure modes

  • Google unreachable / timeout: the verifier throws or returns false. Without an explicit policy this becomes a site-wide form outage. Decide fail-open (accept, log, alert) vs. fail-closed (reject) per form criticality.
  • Token expiry: tokens are short-lived (~2 minutes) and single-use. Stale rendered pages, back-button submissions, and retry logic all produce spurious failures. The package is unlikely to handle replay semantics explicitly.
  • Clock/network asymmetry and duplicate verification: double-submits may re-verify an already-consumed token.
  • Misconfiguration: swapped site/secret keys, missing env var in a new environment, or config-cache staleness produce silent 100% rejection — the highest-frequency real-world incident.
  • Secret leakage: confirm the secret is never logged, echoed in validation messages, or exposed via a debug page (relevant given the Fruitcake org's Debugbar lineage).
  • Accessibility/UX: v2 checkbox degrades for assistive tech and in restricted networks; no graceful fallback exists in a 2017 wrapper.

Ramp-up

  • Engineering ramp-up is very low — hours, not days; the surface area is one rule and one config file.
  • Organizational ramp-up is the real cost: establishing the fail-open policy, key rotation procedure, secret management path (vault/parameter store rather than .env), alerting on verification failure rate, and an internal owner.
  • Recommend an alert on verification-failure-rate deviation (e.g., >5% over 5 minutes) — this is the single highest-value operational control and it is not provided by the package.

TPM recommendation: Do not adopt as a long-term dependency. The 0.17 score and zero dependents are consistent with what the code shows: a thin, useful-in-2017 wrapper that is now a lifecycle liability for a security-adjacent control. Either implement the verifier in-house behind a stable contract, or adopt a maintained alternative that supports reCAPTCHA v3 and current Laravel versions. If a short-term bridge is required, fork, vendor, pin, and schedule its replacement.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource