etcpasswd/oauth-bundle
A Symfony bundle that adds OAuth2 authentication to your security firewall, supporting providers like GitHub and Facebook, with multiple providers configurable at once. You still supply your own user provider.
Architecture fit: Effectively zero for a Laravel codebase. EtcpasswdOAuthBundle is a Symfony2 security firewall bundle, not a Laravel package. It has no service provider, no facade, no config publishing, and no Composer package name — installation is a manual git clone into vendor/bundles/Etcpasswd/OAuthBundle with namespace registration in app/autoload.php. That is the Symfony 2.0.x convention that predates Composer and PSR-0/PSR-4 autoloading as used today. Its integration point is Symfony's security.yml firewall factory system (factories: → security_factories.xml), a configuration mechanism Laravel has no analogue for. The closest Laravel equivalent is Auth::extend / custom guards, which is a different abstraction entirely.
Integration feasibility: Low to none as-is. Bringing this into a Laravel app means either (a) standing up a Symfony2 kernel inside Laravel purely to host an authentication firewall, which is architecturally incoherent and double-authenticates the request pipeline, or (b) rewriting the bundle's firewall logic as a Laravel guard/handler. For (b), the surface area is small — it is essentially "intercept check_path, exchange an authorization code with the provider, resolve a user from the uid claim, hydrate a token" — that is a few hundred lines at most and better served by an existing library.
Technical risk: Very high, and asymmetric in the wrong direction (security-critical code).
Maturity: readme. The README's own banner is "still under development, things might change" — the last known state of the project is a self-declared unfinished prototype.Buzz (kriswallsmith/Buzz) is a retired HTTP client, superseded by HTTPlug → PSR-18 / Guzzle. Reviving it means shipping an unmaintained HTTP client in the auth path.client_secret handling, state/CSRF protection for the callback, token validation, and redirect handling are all security-sensitive. An abandoned bundle will not receive patches for provider-side spec changes (PKCE requirements, OIDC discovery, stricter redirect URI matching) or for PHP/library CVEs.Key questions:
uid: email user provisioning acceptable, or does account linking / email verification matter? This determines whether we need a real package or just a thin adapter.Recommendation: do not adopt. Treat as a reference implementation for a small custom guard, or replace with laravel/socialite (consumer login) / league/oauth2-client (generic flows).
Stack fit: None. The package's assumptions — Symfony2 AppKernel, vendor/bundles, app/config/security.yml, %kernel.root_dir%, XML security factories — have no counterpart in a Laravel application, which boots through bootstrap/app.php, resolves config from config/*.php, and registers auth via the AuthManager/guard driver pattern. There is no shared abstraction to bridge; the two frameworks would be competing for the request lifecycle.
Migration path (recommended): Re-implement the intent, do not port the code. The bundle's contract is compact and fully described by its own config block:
auth_provider / client_id / client_secret / scope → an OAuth2 client config array or config/services.php entry.login_path → a controller that builds the authorization URL and stores state in the session.check_path → a callback controller that validates state, exchanges the code, and maps uid (default email) to a local user via firstOrCreate/linking logic.failure_path → a redirect with a flash error.Use laravel/socialite if the provider is on its driver list (Google, GitHub, Microsoft, etc.), else league/oauth2-client with a provider package. Both are Composer-installable, PHP 8 compatible, and actively maintained. Estimated effort: 1–2 days for Socialite on a standard provider, 3–5 days for league/oauth2-client with a non-standard provider and account-linking rules.
Compatibility: Blocking issues, not tuning issues. PHP version floor (5.3-era code), Symfony 2.0 security factory XML schema, Buzz as HTTP transport, and pre-Composer autoloading all fail independently on a modern stack. There is no version matrix under which this bundle and a current Laravel application coexist cleanly.
Sequencing (if a stakeholder insists on evaluating the original):
composer require semantics via a path repository, and confirm it cannot autoload under the target PHP version. Document the failure — this closes the question with evidence rather than opinion.security.yml (above) into a written acceptance criteria doc: state/CSRF handling, token exchange, uid claim mapping, failure redirect, session behavior.league/oauth2-client.Maintenance: Total cost falls on us from day one. No maintainer, no releases, no issue triage, no security contact. Vendoring the code means every PHP upgrade, Symfony/Laravel upgrade, and OAuth provider spec change becomes an internal patch. The Buzz dependency compounds this: we would own an unmaintained HTTP client inside the authentication path, which is the worst place to own unmaintained code.
Support: None externally. Internally, the only people who can debug it are those who read the source — and the source is an unfinished prototype with a "things might change" disclaimer. Incident response for an auth outage would start from a cold read of unfamiliar 5.3-era code with no tests and no logs contract.
Scaling: Auth is low-QPS relative to application traffic, so raw throughput is not the constraint — the constraint is correctness under concurrency and provider rate limits. This bundle offers no token caching, no refresh-token lifecycle, and no retry/backoff around provider calls; every login is a synchronous outbound HTTP round trip through Buzz with default timeouts. At meaningful login volume (say several per second during a campaign or morning peak), provider 429s and Buzz's lack of connection pooling become user-visible login failures. Socialite/league inherit Guzzle's pooling, retries, and middleware, which is a material operational difference.
Failure modes to expect:
login_path and check_path with no mention of state parameter handling; unvalidated state is an account-linking/CSRF vulnerability. Must be assumed absent until proven otherwise.client_secret in security.yml, with no secrets-management integration and no rotation guidance.uid: email provisioning with no linking policy creates duplicate or hijackable accounts when a user's provider email changes.Ramp-up: Deceptively steep for its size. A new engineer sees ~one bundle and assumes hours; the real cost is reconstructing Symfony2 firewall semantics, then discovering the code must be rewritten. Budget 1–2 days of senior engineering to reach the "do not use" conclusion with confidence, plus 1–2 days to build the replacement. The cheaper path is to skip the evaluation and go straight to laravel/socialite, using this README only as a requirements sketch.
Bottom line for the roadmap: Reject as a dependency. Log it as an evaluated-and-declined item with the rationale (framework mismatch, abandoned, security-critical domain), and allocate 1–5 engineering days to a maintained replacement. There is no scenario in which maintaining this bundle is cheaper than adopting a supported OAuth client.
How can I help you explore Laravel packages today?