dimkinthepro/jwt-auth-bundle
A JWT authentication bundle for PHP apps that handles token issuance, validation and request guards. Configure signing keys, token TTL and refresh behaviour, then protect routes with drop-in middleware and a simple, framework-friendly API.
Architecture fit — the gate is a framework check, and it fails. This is a Symfony Bundle: it ships a Bundle subclass, a DependencyInjection extension with a config tree, and a Security firewall authenticator factory. There is no ServiceProvider, no guard contract, no middleware alias, no publishes() config. For a Laravel codebase the runtime leverage is zero. The TPM-level conclusion is not "evaluate harder" — it is that the build-vs-buy question was framed against the wrong ecosystem, and the correct output of this evaluation is a decision record closing it, plus a redirect of the engineering time.
What a TPM actually extracts. The artifact of value is a reference design spec, not a dependency: a token-issuer/token-parser service boundary, a claims envelope (sub, iat, nbf, exp, jti plus an application namespace), listener-based validation sequencing, and a configuration surface (secret, algo, ttl, user_provider). That spec is roughly half a day of tech-lead time and costs nothing in licensing or maintenance. It becomes the acceptance criteria for whichever Laravel-native package we do adopt.
Integration feasibility — quantify the delta, don't debate it. A credible port/wrap estimate is 3–5 engineer-weeks (ServiceProvider, custom guard, middleware, mocking Symfony container/event-dispatcher semantics in tests). Compare against laravel/sanctum at well under a day, or tymon/jwt-auth at a day or two. That gap is the headline number for any stakeholder conversation, and it is the benchmark every paid alternative must beat.
Technical risk. Three categories a TPM owns rather than delegates:
2026-08-01 last-release date is future-dated. Until verified as a real tag versus an artifact, it must not be allowed to resolve silently through composer update. Treat as a release-engineering control, not a footnote.firebase/php-jwt. Every JWT CVE in the ecosystem reaches us through a package nobody is patching on our behalf. No CVE monitoring exists unless we create it.Key questions the TPM must get answered before funding any spike:
Stack fit: none, and the plan should say so in one line. The Symfony idiom is a request listener/authenticator; Laravel's is a guard plus middleware. The concepts map cleanly; the code does not. Do not schedule a "make it work in Laravel" spike — that is net-new authentication work wearing this bundle's name, and it will be estimated as integration when it is actually greenfield.
The migration path is inverted. There is no path to this package; there is a path away from evaluating it:
laravel/sanctum first, tymon/jwt-auth if JWT-specific semantics are a hard requirement).POST /auth/token, one protected route, one guard, one config file. Ship a 200 and a 401, then stop.jti, refresh rotation in an opaque store we control, clock-skew leeway, algorithm pinning. These are now explicit backlog items rather than mid-sprint discoveries.Compatibility. The real compatibility axis is Symfony minor version (Security's authenticator model changed materially in 5.3; firewall config shape is version-sensitive), not Laravel. That coupling is a standing upgrade liability with no upstream fix — a reason to avoid it even in a Symfony shop.
Sequencing rule. Auth is the highest-blast-radius component we ship. Nothing in this category enters a lockfile without an owner, a CVE-watch calendar entry, and a documented exit path. If any of those three is missing, the answer is no.
Maintenance. With 0 stars and 0 dependents we are the de facto upstream. The recurring work is: fork into a path repository with a NOTICE, pin the firebase/php-jwt version, monitor CVEs, and re-audit on every Symfony major. That is an ongoing tax on a component that, in Laravel, delivers no runtime value — the worst possible cost-to-benefit ratio for an auth dependency.
Support. No vendor, no SLA, no issue history, no Stack Overflow corpus. Every edge case is ours to discover and document. For a regulated or customer-facing identity workload this alone is disqualifying.
Scaling. Technically the model is stateless and scales horizontally without ceremony — that is genuinely the best thing about JWT. Operationally it does not scale, because the constraint is people: one maintainer, one fork owner, one person who knows the claim envelope. That is a bus-factor of one on the most security-sensitive path in the product.
Failure modes to write into the risk register:
none, never derive from the token header, assert with a test that feeds an alg: none token.kid — rotation becomes a coordinated outage unless overlapping keys are supported.composer update.Ramp-up. Reading it for reference value is roughly 30–60 minutes for a senior engineer and is worth doing. Building against it is 3–5 engineer-weeks and is not. The honest ramp-up plan is: one engineer, half a day, produce the spec, close the ticket, redirect the remaining 3–5 weeks to a supported Laravel-native path — which lands in days, not weeks, and carries a maintainer we did not have to fund.
How can I help you explore Laravel packages today?