splash/oauth2
Splash OAuth2 brings OAuth2 authentication to Laravel/PHP applications, simplifying secure token handling, authorization flows, and API integrations. It offers a clean, framework-friendly way to protect routes and connect services with standard OAuth2 providers.
What the package claims to be — and the ambiguity to resolve first. The description positions splash/oauth2 as an authorization server: it issues and validates Bearer tokens, ships middleware and scopes, and is backed by Eloquent models for clients, tokens, and scopes, with authorization-code, client-credentials, and password grants. That is the laravel/passport problem space. Earlier internal notes in this repo evaluated it as a client-side connector library (the league/oauth2-client problem space). Those are opposite halves of the protocol and imply opposite decisions: "replace Passport for our own API" versus "wire up third-party integrations." Resolving that scope question is the TPM's first deliverable — before any engineer spends a day on it. If the description is right, the comparison set is Passport/league/oauth2-server; if the notes are right, it is league/oauth2-client/Socialite.
Architecture fit. As an authorization server, the fit is real but narrow. The Laravel-shaped packaging (service provider, publishable config and migrations, route middleware, Eloquent persistence) is exactly the shape of a drop-in Passport alternative, and the value proposition — "don't implement OAuth2 grant flows and token validation yourself" — is a legitimate build-versus-buy call. The risk is that the category is already solved: laravel/passport is first-party, and league/oauth2-server is the audited protocol engine underneath it. A package with zero dependents is competing against a first-party default, so its only defensible niche is convention fit with the Splash toolchain or a materially simpler surface.
Integration feasibility. Unverified and gated. Three checks decide go/no-go in an afternoon: (1) the GitLab repository is publicly readable and the code is Composer-installable or vendorable; (2) a declared license permits internal and redistributed use — an unlicensed repo is legally unusable regardless of quality; (3) composer.json constraints accept the target PHP/Laravel majors, and its migrations and service-provider bindings do not collide with Passport. Zero stars and zero dependents on a non-GitHub host means this was almost certainly extracted from one company's product, not built as a library.
Technical risk.
state/PKCE enforcement, scope escalation, token revocation, and refresh-token rotation. Password grant is deprecated in OAuth 2.1 — shipping it by default is a design signal, not just a feature.league/oauth2-server, that is a hard stop for production use.Key questions for the maintainer (or the code).
league/oauth2-server / league/oauth2-client, or reimplement grants?Stack fit. Only two situations make this worth a look. First, you are already inside the Splash/SplashTools ecosystem and its Laravel conventions, so the package drops in without translation. Second, you need to stand up an OAuth2 server for your own API and want a smaller, more readable alternative to Passport — in which case Passport remains the default and this must earn its way in. If the real need is third-party connectors, this is the wrong tool and the earlier connector assessments already make the case for league/oauth2-client + socialiteproviders. If the real need is user login, Socialite already covers it.
Migration path. Treat it as source material, not a dependency. Mirror the repository into your own GitLab group, pin to a commit SHA, and place it behind an internal interface (OAuthServer or OAuthConnector) that application code depends on. That adapter boundary is the entire strategy: it lets you patch now and swap to Passport, league/oauth2-server, or a maintained alternative later without touching call sites. If you must consume via Composer, use a VCS repository entry with an explicit commit ref — never a floating branch, never a GitLab URL resolved at build time in CI.
Compatibility. Verify before anything else: PHP constraint, Laravel major, Guzzle major, and whether its migrations collide with existing oauth_clients / oauth_tokens tables (a naming collision with Passport in the same database is a migration-order problem, not a cosmetic one). Confirm the service provider is auto-discovered or manually registrable, that config is publishable, and that publishing does not overwrite an existing config/oauth2.php. A Guzzle 6 pin alone would disqualify it on a modern Laravel 10/11 codebase.
Sequencing.
composer.json, LICENSE, src/, and the service provider. Confirm server-vs-client. Kill here if it reimplements grants or lacks a license.Maintenance. Ownership transfers to us on day one. Assume zero upstream responsiveness and plan for our fork to be the maintained line, with recurring budget for security patching of the OAuth2 primitives underneath it. CVEs in OAuth2 libraries are not hypothetical, and a dormant fork turns a routine patch into a project. Assign one named owner with explicit time allocation; unowned forks rot within two quarters, and an unowned auth fork is worse than no abstraction.
Support. No community, no issue history, no Stack Overflow corpus. Internal documentation of the token lifecycle, config keys, grant behavior, and failure semantics becomes mandatory rather than nice-to-have. Every question a new engineer would have asked the maintainer must be answered in the repo README or it will be re-derived at cost.
Scaling. Three hazards. First, refresh stampedes: concurrent workers noticing an expired token and all hitting the token endpoint, which rotation-enabled providers answer by invalidating the refresh token — verify single-flight refresh exists or add a distributed lock at the adapter layer. Second, token table growth and key management as tenant and client counts rise; confirm indexes on client/tenant/expiry and a cleanup job for expired tokens. Third, key rotation, which is straightforward in Passport and unknown here. Confirm secrets are encrypted, not merely base64'd.
Failure modes to instrument.
Ramp-up. A Laravel engineer fluent in OAuth2 can be productive in the fork within a day or two, provided the repo is documented and the adapter boundary is real. The genuine ramp-up cost is organizational: convincing a team to put a zero-dependent package on the credential path. That argument cannot be won with a judgment call — it requires the pilot, the security read, and a harden step. Given the thin adoption signal and the unresolved server-vs-client ambiguity, fund this only as a scoped spike with a written kill criterion, and do not let it become a shared platform dependency until a forked, pinned, adapter-wrapped version has survived one full token lifecycle in production. The measurable outcome to commit to is "auth surface shipped N days sooner with a reusable, security-reviewed flow and a named owner" — not "added a dependency."
How can I help you explore Laravel packages today?