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.
grant_type, client_id, code, redirect_uri, scope, PKCE verifier, etc.), and normalizing errors before they hit your grant handlers. That's a "buy" decision you only make once, and only if the surrounding server implementation is already chosen.league/oauth2-server, web-token/jwt-framework, or a hosted IdP.league/oauth2-server for authorization servers and web-token/jwt-framework for JWT/JOSE. Zero recorded dependents and no star signal in this snapshot is a strong "do not standardize on this" input, regardless of code quality.Consider it only when all of the following hold:
Look elsewhere when:
league/oauth2-server, which has active maintenance, broad adoption, framework integrations, and an ecosystem of grant extensions.web-token/jwt-framework (same author lineage, actively maintained) or a vetted IdP.league/oauth2-server's request/authorization-request handling and laminas-diactoros/nyholm/psr7 for parsing before committing.Net PM read: treat this as a reference implementation and reading material, not a dependency. Green-light a short engineering spike to mine it for validation rules and edge cases; red-light adding it to composer.json in a customer-facing service.
One-line summary: A small PHP utility library for parsing and validating OAuth2 server requests — technically focused, but with no visible adoption, no dependent ecosystem, and a lineage that the PHP community has largely consolidated away from. We should not standardize on it.
For executives: We evaluated it as a shortcut for OAuth2 endpoint plumbing. It saves perhaps a few days of low-level validation work, but it introduces a single-maintainer, zero-adoption dependency directly in our authentication path. The cost of a security incident or an unmaintained dependency in auth vastly exceeds the days saved. Recommendation: no adoption; if we need an authorization server, we scope it around a maintained library or a hosted identity provider, both of which we can support contractually.
For engineering: The package handles PSR-7 request parsing for authorization/token endpoints — the boring, error-prone part of OAuth2. The code is likely fine; the problem is everything around it. Zero recorded dependents means no one else is exercising these code paths in production, so we'd effectively be the maintainer. league/oauth2-server covers the server side, and web-token/jwt-framework covers the JWT side, both with real adoption. Proposed action: a 1–2 day spike to harvest the request-validation rules and RFC edge cases into our own thin layer or into our chosen library's extension points, then move on. If anyone proposes adding it as a direct dependency, escalate to a security review first.
Risk framing to keep on the record: OAuth2 is a security contract, not a convenience API. Dependencies in that path must clear a higher bar — active maintenance, documented disclosure process, and evidence of real-world use. This package does not clear that bar on the evidence available.
How can I help you explore Laravel packages today?