Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Oauth2 Server Password Client Laravel Package

spomky-labs/oauth2-server-password-client

A password-grant client extension for the Spomky-Labs OAuth2 server library, adding support for the resource owner password credentials flow so your authorization server can issue tokens from a username and password.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What the package actually is. spomky-labs/oauth2-server-password-client is not a standalone OAuth2 server. It is a grant extension for the (now abandoned) spomky-labs/oauth2-server library that implements the Resource Owner Password Credentials grant (RFC 6749 §4.3) — the "password client" flow where a client posts a username and password directly to the token endpoint and receives an access token. Its value is entirely contingent on running the Spomky OAuth2 server underneath it.

Architecture fit. Poor for a Laravel codebase. Laravel's first-party OAuth stack is Passport, which wraps league/oauth2-server with its own GrantType, ClientRepository, and UserRepository contracts. This package plugs into Spomky's grant interfaces, not League's. Adopting it means either (a) running a second, parallel OAuth2 implementation alongside Passport, or (b) replacing Passport wholesale with the Spomky stack. Both are architectural regressions relative to the framework's supported path. For a non-Laravel PHP service the fit is marginally better, but the underlying server library is still unmaintained.

Integration feasibility. Low. Signals are unambiguous: zero stars, zero dependents, zero score. That means no downstream production usage to learn from, no issue history to mine for known breakage, and no one to answer questions. Expect Composer resolution friction against a modern Laravel app — the Spomky OAuth2 line tracks PHP 5.6/7.x and the PSR-7 v1 era, and its PSR-7/HTTP message dependencies collide with current laminas-diactoros/nyholm/psr7 constraints pulled in by Passport or Symfony. Getting it to install is a spike; getting it to install and coexist with the rest of the dependency graph is the real cost.

Technical risk. High, on three independent axes:

  1. Abandonment risk — no releases, no security response process. Any CVE in its transitive dependencies becomes yours to patch via a fork.
  2. Protocol risk — the password grant is deprecated in OAuth 2.1 and discouraged by the current OAuth 2.0 Security BCP (RFC 9700). It cannot express MFA, consent, or phishing-resistant authentication, and it puts plaintext credentials in the token endpoint's request path, widening PCI/audit scope.
  3. Integration risk — an abandoned library pinned against framework internals will break silently on the next PHP or Laravel minor upgrade, and the breakage surfaces in the authentication path, which is the worst place to discover it.

Key questions to resolve before any code is written.

  • What user-facing requirement is driving this? First-party mobile/SPA login is the usual answer, and it is served better by Sanctum (first-party tokens) or Passport with authorization code + PKCE.
  • Is there an existing IdP (Entra ID, Okta, Keycloak, Cognito, Auth0)? If so, this package is redundant regardless of its quality.
  • What PHP and Laravel versions are in scope, and is Passport already installed? A composer why on the current lockfile answers the coexistence question in minutes.
  • Is ROPC a hard external constraint — i.e., a client we don't control already ships a password-grant flow? If not, the requirement should be reframed.
  • Who owns authentication security on this team, and do they have capacity to own a forked, unmaintained grant implementation indefinitely?

Recommendation: do not adopt. Treat this as a "migrate away from / do not introduce" finding rather than a build-vs-buy decision.

Integration Approach

Stack fit. In a Laravel context the supported targets are: Sanctum for first-party SPA/mobile tokens (simplest, no OAuth ceremony), or Passport where a real OAuth2 authorization server is needed — Passport still ships the password grant, gated behind Passport::enablePasswordGrant() in Laravel 11+, with authorization code + PKCE as the recommended default for third-party and mobile clients. Outside Laravel, league/oauth2-server (actively maintained) or an external IdP. There is no scenario in a modern Laravel app where this package is the right answer.

Migration path (if it is already running somewhere). Treat it as a strangler-fig replacement, not an upgrade:

  1. Inventory — enumerate clients, grants in use, token lifetimes, refresh-token rotation behavior, and which client IDs actually exercise the password grant.
  2. Stand up the target in parallel — new issuer/keys, new client registrations, same user store behind the repository interface.
  3. Dual-issue — route new token requests to the new stack while the old endpoint stays live but frozen (no new client registrations).
  4. Drain — force refresh-token expiry on the old stack so the population decays naturally rather than requiring a hard cutover.
  5. Decommission — revoke keys, remove the Composer dependency, delete the fork.

The critical sequencing constraint is that step 3 must precede step 5 by at least one full refresh-token lifetime; otherwise you do a flag-day cutover on the login path.

Compatibility. Two hard gates before committing: (a) PHP version support — expect the package's constraint to exclude 8.1+ and possibly 8.0; (b) PSR-7 major version — Spomky-era code targets v1 interfaces, and mixing v1 and v2 message implementations in one container produces type errors that only appear at runtime, on the token endpoint. Verify both in a throwaway branch, not in the main app.

Sequencing for a greenfield decision. Requirement confirmation (days) → target selection spike, Sanctum vs. Passport vs. external IdP (3–5 days) → security review of the chosen flow, specifically around token storage on mobile and refresh rotation (days) → implementation (1–2 weeks) → pen test on the auth path. Total in the low single-digit engineer-weeks. Attempting to make this package work would plausibly exceed that, with a worse endpoint.

If ROPC is genuinely unavoidable — a legacy client you cannot change — implement it inside Passport via enablePasswordGrant() rather than by introducing a second OAuth stack, isolate it behind a dedicated client, and put it on an explicit deprecation clock with a named owner and a target removal date.

Operational Impact

Maintenance. Effectively infinite and unbounded. With no upstream releases there is no patch stream, so you inherit every transitive dependency permanently: you must fork, track CVEs yourself, and re-validate on every PHP and framework upgrade. Budget a standing allocation of a few engineer-days per quarter just to keep it from rotting, before counting any actual incidents.

Support. Zero. No maintainer response, no community, no Stack Overflow corpus, no documentation beyond a README. Any incident is a novel investigation with no external escalation path — the mean-time-to-resolution is whatever your team can figure out from the OAuth spec and the source. That is a materially different support posture from a first-party framework component with an active issue tracker.

Scaling. Throughput is not the concern — a token endpoint is low-QPS and cacheable at the edges. The scaling concern is blast radius: the password grant forces the token endpoint into the credential-verification path, promoting it from "issues tokens" to "Tier-0 authentication dependency that sees plaintext passwords." That raises its availability target, its change-control requirements, and its compliance scope. Rate limiting, account lockout, credential-stuffing detection, and anomaly logging all become yours to build — none of that ships with the package.

Failure modes to plan for. Silent failure is the dominant risk category:

  • Composer resolution breakage on a PHP minor bump, discovered at deploy time.
  • Grant interface drift after an unrelated dependency update, causing the grant to be loaded but not dispatched — tokens simply stop issuing, or worse, a permissive default lets an unauthenticated request through.
  • Missing refresh-token rotation or revocation on the password path, leaving long-lived tokens that survive a password change.
  • Brute-force exposure on the password endpoint with no built-in throttling.
  • Unpatched transitive CVEs, with no advisory feed to tell you they landed.

Ramp-up. The package's own API is small and learnable in an afternoon — that is the misleading part. The real ramp-up is OAuth2 domain literacy: the team must independently reason about grant semantics, token binding, audience validation, and rotation, because there is no maintainer to validate assumptions against. Expect 2–3 weeks before an engineer is genuinely confident modifying the auth path, plus a security review, plus a written runbook. Compare that to Sanctum or Passport, where the framework documentation, the community corpus, and the upgrade guides carry most of that load.

Net. The operational model this package implies — one team privately owning a forked, unmaintained OAuth2 password grant — is a durable liability disproportionate to any integration convenience it might offer. The correct disposition is to standardize on the framework-supported path and, where the password grant is still required by an external client, contain it inside Passport behind a dated deprecation plan.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator