oro/oauth2-server
OAuth2 server integration for OroPlatform applications, providing authorization and token endpoints, client and access token management, and secure API access for third-party integrations.
league/oauth2-server), league/oauth2-server directly (the maintained successor to the codebase this forks), and managed identity providers (Auth0, Okta, Keycloak, Ory Hydra). This package anchors the "adopt a small MIT library we can read and patch" branch — and its two-star, zero-dependent profile is the honest counterweight to that branch.Consider it when:
brentshaffer/oauth2-server-php and a PHP upgrade is blocked. A fork is a cheaper bridge than a rewrite — treat it as a security-patch swap gated by a conformance test suite.Look elsewhere when:
league/oauth2-server) for OAuth 2.0, or Sanctum if you only need first-party API tokens. Despite how it is described, this is not a Laravel package — there is no service provider, config, facade, or Eloquent integration. You supply all of it, including adapting Illuminate\Http\Request into the library's own request/response objects.league/oauth2-server, the maintained successor to the codebase this is forked from.The decision rule: total cost of ownership over 18 months, not license price. Zero license cost is real but small next to the cost of a named internal owner, a patch cadence, and an external security review.
To executives: Standards-based API authentication is a prerequisite for our partner-integration and enterprise-sales roadmap — buyers and security reviewers expect OAuth 2.0, and its absence shows up as deal friction rather than as a line item on a plan. This package's license cost is zero and its lineage is proven, which makes it tempting; the real cost is ownership. It is a small single-vendor fork with essentially no community, no dependents, and no visible CVE process, so adopting it means our team carries the security patching for a component that, if it fails, fails closed across every protected surface at once. My recommendation is to treat it as a reference implementation and fallback rather than the default. If we are on the Oro stack, adopt it and budget maintenance explicitly. If we are on Laravel or greenfield PHP, standardize on league/oauth2-server via Passport instead — same protocol, maintained upstream, and we get the ecosystem and the Laravel integration for free.
To engineering: It is a fork of the long-standing brentshaffer/oauth2-server-php, so the grant and token machinery will look familiar and the learning curve is low. What we inherit is the maintenance: PHP-version compatibility, security patches, and any protocol modernization — PKCE, refresh-token rotation and replay detection, redirect-URI validation, token introspection — all land on us. The largest integration tax is the request/response abstraction mismatch, and that is also the most common source of subtle bugs. Realistic ramp-up to production-hardened is two to four weeks against roughly two to four days with Passport, plus an external security review that I consider non-negotiable for an auth server.
The ask: Approve a one-to-two-week evaluation spike rather than a direct adoption. Scope it to three things: (a) confirm the fork's supported PHP range and composer.json constraints against our target stack, and establish what Oro actually changed versus upstream and whether those changes matter outside OroPlatform; (b) compare real integration cost against league/oauth2-server plus Passport for our specific stack, including storage adapters, scope middleware, and revocation; and (c) document exactly what we would own — patch cadence, advisory monitoring, named owner, bus-factor mitigation, and the upgrade path to a full IdP such as Keycloak or Hydra if our needs outgrow this. Decision criterion is 18-month total cost of ownership, not license price. I would rather spend two weeks proving Passport is the answer than two quarters discovering this fork isn't.
How can I help you explore Laravel packages today?