willdurand/oauth-server-bundle
Symfony bundle that turns your application into an OAuth 2 server. It integrates the oauth2-server-php library with Doctrine-backed storage for clients, access tokens, refresh tokens, and authorization codes, plus Symfony Security integration for protecting your APIs and resources.
What this package actually is. willdurand/oauth-server-bundle is a Symfony2 bundle, not a framework-agnostic library. It is a thin glue layer (DI extension, security authentication provider/factory, Doctrine mappings, token/authorize controllers) wrapped around an OAuth 1.0 (RFC 5849) signing/validation core. The protocol logic is portable; the shipped artifact is not. That distinction drives the entire evaluation.
Architecture fit — poor. A Symfony bundle's lifecycle assumes Symfony\Component\HttpKernel\Bundle\Bundle, the Symfony DI container, the EventDispatcher, the Security component's authentication factory chain, and (typically) Doctrine ORM. Laravel has no bundle registry — service providers are not bundles, and there is no supported shim that maps a Symfony2 bundle onto Laravel's container, router, middleware pipeline, or auth guards. Making this run in Laravel means rewriting the integration surface, at which point the package contributes only the RFC 5849 signing algorithm.
Integration feasibility — near zero as-is. The first hard wall is dependency resolution: the package's Composer constraints target Symfony 2.x components, while Laravel 9/10/11 require symfony/* ^6.x/^7.x. These are mutually exclusive — composer require fails before any code discussion. A fork would be required, and the fork would then need its own HTTP layer, its own persistence layer, and its own security wiring. Realistic estimate: >90% rewrite, <10% reuse.
Technical risk — critical. Evidence:
| Signal | Reading |
|---|---|
| Archived repo | No upstream fixes, no security response process, no CVE triage |
| 31 stars / 0 dependents | No ecosystem validation, no canary users, no community knowledge base |
| Symfony2-era codebase | PHP 8.x incompatibilities (old crypto helpers, dynamic properties, removed functions, untyped signatures) |
| OAuth 1.0 (RFC 5849) | Practically superseded by OAuth 2.0 (RFC 6749); not issued by Passport, Auth0, Okta, Keycloak, or any modern IdP |
| No maintenance window | Any vulnerability we find, we fix — permanently |
The reported opportunity score (4.36) should be read as "there is a real, underserved niche for OAuth 1.0 server tooling," not as "this artifact is a good dependency." The gap is the absence of maintained options; this package is not a solution to that gap — it is an example of it.
Key questions to answer before any further spend.
ext_authz, API Gateway + Lambda authorizer) acceptable instead of an in-app implementation?Stack fit — do not integrate the package; harvest the algorithm. There are exactly three viable paths, in preference order:
league/oauth2-server for OAuth 2.0 + PKCE. This is the default answer and should require explicit sign-off to override.Migration path — there isn't an incremental one. This is a hard cutover, not a phased adoption. If an existing Symfony2 service already runs this bundle, the correct move is strangler-fig: freeze that service, put it behind a network boundary as an isolated token/signature service, and migrate consumers to OAuth 2.0 on a published timeline. Do not extend it, do not add features to it, do not deploy it to new environments.
Compatibility — fails at every layer. Composer constraints conflict with any modern Laravel; PHP 8.x compatibility is unverified and expected to fatal; no PSR-7/PSR-15 interfaces; no static analysis baseline, so it cannot pass modern CI quality gates without a funded fork; the test suite is Symfony2/PHPUnit-era and unlikely to run green on current tooling.
Sequencing.
Maintenance — we become the maintainer, permanently. There is no upstream, no CVE feed, no release cadence, and no maintainer to escalate to. Budget roughly 0.1–0.25 FTE ongoing for PHP runtime upgrades, security triage, and dependency drift — indefinitely, because the protocol itself will never get easier to retire once consumers depend on it. This is the single largest cost and it does not appear on the initial estimate.
Scaling — protocol is stateless, persistence is not. Signature computation is negligible. The real load path is the nonce/timestamp store and the token/consumer tables: the nonce table needs a strict TTL, an index on (consumer_key, nonce, timestamp), and a uniqueness constraint, or it becomes both a write hotspot and a replay-vulnerability surface. Horizontal scaling of the app tier is fine; the bottleneck and the correctness risk both live in that table.
Failure modes to design for explicitly.
X-Forwarded-Proto handling must be specified and tested, not discovered.Ramp-up — high, and concentrated. OAuth 1.0's signature base string is notoriously unforgiving; few engineers have implemented it. Expect 1–2 weeks before a competent engineer is productive, and accept that institutional knowledge will sit with one or two people. Documentation consists of the RFC plus a decade-old Symfony2 cookbook page. There is no vendor support, no SLA, and no active community forum to fall back on.
Bottom line. Do not adopt this package into a Laravel codebase. It is architecturally incompatible, dependency-incompatible, and unmaintained, and the protocol it implements is legacy. Treat the repository as an algorithm reference at best. The real decision to escalate is whether we need OAuth 1.0 at all — and if the answer is yes, fund a small, isolated, owned implementation or an edge gateway rather than inheriting this artifact.
How can I help you explore Laravel packages today?