spomky-labs/oauth2-server-utils
Utility helpers for the spomky-labs/oauth2-server PHP library, designed to simplify common OAuth2 server setup and token-related tasks. Useful for developers building standards-compliant authorization servers with the Spomky Labs OAuth2 framework.
Architecture fit
league/oauth2-server, whose request classes are the direct descendants of this code. Fit is duplicative rather than complementary.Integration feasibility
symfony/psr-http-message-bridge plus a PSR-7 implementation (nyholm/psr7 or laminas-diactoros). That bridge is an additional version matrix to maintain.Technical risk — high
league/oauth2-server v5+; spec errata (RFC 6749/6750 clarifications, PKCE per RFC 7636, error-response shapes) landed upstream in the successor, not here.grant_type, scope, redirect_uri, or client authentication is an auth-bypass class of defect, and abandoned code sitting in that position is a standing liability.Key questions
Stack fit
league/oauth2-server → the maintained successor of these abstractions. Adopting this package means either duplicating Passport or assembling a server from parts.league/oauth2-server.Migration path
League\OAuth2\Server\RequestTypes\* and the corresponding grant classes. The shapes are close enough that mechanical mapping is usually feasible, but budget a real sprint and a security review — the mapping touches every grant path.Compatibility
symfony/psr-http-message-bridge + nyholm/psr7 is the lightest maintained combination.Sequencing
league/oauth2-server vs. Passport.Maintenance
Support
Scaling
Failure modes
scope or grant_type producing incorrect authorization decisions — the hardest class of bug to catch with tests and the most damaging in production.league/oauth2-server/Passport end up present — verify there are no overlapping interfaces or class collisions before attempting coexistence.Ramp-up
Recommendation: Do not adopt. Zero dependents and a blank star signal are themselves the finding. Treat this package's presence as evidence that the surrounding stack predates league/oauth2-server v5; the correct move is a maintained server (Passport) or an explicit, resourced fork-and-own decision with a named owner.
How can I help you explore Laravel packages today?