retitalia/authentication-bundle
Authentication bundle for Retitalia PHP projects, offering reusable sign-in, user authentication, and access-control integration. It centralizes common auth configuration and flows so teams can add secure, consistent login handling to their applications with less boilerplate.
Architecture fit — the first gate is a framework mismatch. Despite being triaged into a Laravel/PHP package queue, retitalia/authentication-bundle is named and structured as a Symfony bundle: bundle registration, DI extension, config tree, security firewall integration. In a Laravel application it will not install-and-run; you would be wrapping foreign services, hand-porting configuration, and rebuilding controller/route glue that Socialite already gives you. The TPM-level consequence is that this evaluation cannot produce a single "adopt/reject" answer — the decision is per target application, and for any Laravel service on our roadmap the answer is "reject; reference-only." Reserve real evaluation effort for Symfony services only, and cap that effort until the framework question is confirmed in writing.
What the package actually buys. The capability — Google SSO over OAuth2 — is commodity. Three mature, maintained options (Laravel Socialite, league/oauth2-google, KnpUOAuth2ClientBundle) cover the same ground with CVE coverage and Symfony-major compatibility guarantees. The bundle's only differentiated value is whatever RetItalia-specific behavior it encodes: user-provider shape, domain allowlisting, role mapping, session policy, security config presets. That value is unverified and undocumented. The TPM deliverable from the spike is a one-page capability inventory answering "what is here that we would otherwise write ourselves?" If the answer is "nothing," the build-vs-buy analysis collapses to "use the maintained library" and the evaluation ends early and cheaply.
Integration feasibility: low-to-moderate, gated on undocumented unknowns. Zero stars, zero dependents, no visible release cadence. That profile is consistent with an internal corporate bundle extracted for organizational reuse, not a general-purpose package — which means the documentation was written for an audience that already knew the answers. Two feasibility unknowns dominate: whether Composer can resolve a tagged release at all, and whether an engineer outside RetItalia can configure it without reading the source. Plan for reading the source, and budget a timeboxed spike rather than a full estimate.
Technical risk is high and concentrated in three places.
state/PKCE handling, callback replay, redirect-URI allowlisting, session fixation on login. This is the risk that decides the outcome for anything customer-facing.Key questions to close before any engineering commitment.
composer.json?Stack fit — decide per application, not once globally. Symfony 5/6+: viable candidate, proceed to spike. Laravel: do not adopt the bundle; lift any RetItalia business rules from source as reference and implement SSO with Socialite plus a guard. Other PHP frameworks: reference-only. Record the decision as adopt / reference-only / reject against a named application, with a date and an owner. A single global verdict will be misread as blanket approval.
Migration path — the adapter is the whole point. The dominant risk is abandonment, and the cheapest mitigation is architectural, not contractual. Sequence: (1) publish a short ADR documenting the reuse decision and the named fallback (league/oauth2-google or KnpUOAuth2ClientBundle); (2) put the bundle behind an internal SSO adapter interface so provider swap is a one-file change at every call site; (3) integrate behind that adapter. Even if the package is later rejected, the ADR and the interface retain their value.
Compatibility — pin aggressively. Pin the bundle to an exact tag or commit SHA, and pin the transitive OAuth2 client explicitly rather than trusting the bundle's constraint ranges. Verify PHP/Symfony support against the target's composer.json before writing code. Confirm the bundle's firewall integration does not collide with existing authenticators, and that its routes are prefixable so they cannot shadow application routes. Consuming by branch is the classic way to get a silent behavior change in production auth — prohibit it.
Sequencing with hard gates.
| Step | Work | Effort | Gate |
|---|---|---|---|
| 1 | Confirm framework; obtain RetItalia owner contact | ~1 week, mostly waiting | No owner contact → treat as self-owned fork |
| 2 | Timeboxed spike: install, authenticate against a Google test tenant, exercise refresh and failure paths | 3–5 eng-days | Capability inventory written |
| 3 | Security review of bundle source + our adapter | 3–5 days, parallel | Findings triaged |
| 4 | Go/no-go against the ADR | — | Explicit decision record |
| 5 | Production integration behind a feature flag | — | Internal users first |
| 6 | Staged rollout with documented fallback to existing login | — | Rollback rehearsed |
Nothing past step 4 should start before step 4 concludes. The temptation with a "free" package is to let integration momentum substitute for a decision; a TPM's job here is to hold that gate.
Success metrics to define up front. SSO lifts signup completion and cuts password-reset tickets — commit to how you will measure that (completion rate delta, reset-ticket volume, time-to-first-login) so the post-launch review is evidence-based rather than anecdotal. A stopgap that is never evaluated becomes permanent by default.
Maintenance — assume we own it. Zero dependents means no maintainer community; patches, Symfony compatibility bumps, and Google API changes land on us or on nobody. Plan a fork-and-mirror into our own VCS within the first quarter of adoption, assign a named owner, and annotate the dependency inventory as "unmaintained, internal fork." Without that annotation an SBOM or vulnerability scanner will flag it later with no context, and someone will spend a week re-litigating this decision.
Support — an organizational dependency, not a vendor SLA. The escalation path runs through RetItalia's owning team. Confirm a working contact and an escalation route before adoption; if neither is obtainable, the ADR must state plainly that we have taken responsibility for the source. Internal support load is modest — SSO is a small, well-bounded integration — but not zero, particularly around IdP-side configuration changes and consent-screen policy shifts.
Scaling — technically trivial, organizationally compounding. Authentication throughput is negligible relative to application traffic; the bundle will not be a bottleneck. The real scaling concern is concentration: every additional application that adopts it inherits the same single-owner risk. If it becomes the de facto SSO path across N services, the abandonment risk multiplies by N. This is the strongest argument for making the internal adapter mandatory for every adopter — it converts a future migration from N rewrites into N small changes.
Failure modes, ranked.
Ramp-up — the hidden cost, and where the durable value sits. With no public documentation and no Stack Overflow corpus, a new engineer ramps by reading source: one to two days for a competent Symfony developer, more for anyone shaky on OAuth2 flows. Make a short internal runbook a deliverable of the spike, not an afterthought — configuration reference, failure-mode table, rollback steps, and the adapter's contract. The runbook and the adapter are the outputs that survive either verdict. If the decision is "reject," you still ship an accelerated path to the maintained alternative and a documented rationale that stops the next person from re-running this evaluation.
How can I help you explore Laravel packages today?