liberusoftware/sessions-devices
Laravel package for managing user sessions and devices: track active sessions, associate them with devices, and revoke access per session or device. Gives users control over where they're signed in and helps secure accounts with clear, auditable session oversight.
Architecture fit. The package targets a real, recurring Laravel need: a user-facing "active sessions" inventory with per-device revocation. The framework ships the primitives — the database session driver, Illuminate\Session\Middleware\AuthenticateSession, and Auth::logoutOtherDevices() — but no inventory UI, no device metadata model, and no per-session revocation ergonomics. That gap is exactly what this module claims to fill, so the conceptual fit is clean for any app with authenticated human users (SaaS, admin backends, customer portals).
The concern is packaging shape. The module- naming and the liberusoftware namespace suggest this is one unit of a modular monolith suite rather than a standalone, framework-generic package. Before any commitment, verify whether it depends on Liberu core abstractions (base service providers, shared contracts, Filament/Livewire admin layers, opinionated user models) or is genuinely drop-in for a vanilla Laravel app. A package that only installs cleanly inside its parent distribution has a very different integration cost than one that doesn't.
Integration feasibility. Mechanically straightforward if standalone: composer require, publish config and migrations, register the middleware, expose a settings screen. The unknown is what it assumes about the session store. Does it require the database driver and extend the stock sessions table, or does it maintain a parallel devices table keyed by session ID? Does it hook the session lifecycle via events, or does it expect you to call its API from your login flow? Each answer changes the effort from hours to days.
Technical risk. This is where the package scores poorly as a candidate. Zero stars, zero dependents, and zero public consumers means no production vetting and no crowd-sourced bug discovery. The release date of 2026-10-26 is anomalous and should be treated as a metadata error until confirmed — do not read it as a maturity signal. For a component sitting directly on the authentication path, the risk profile is asymmetric: a defect in revocation logic doesn't degrade gracefully, it silently fails to terminate sessions, which is a security incident rather than a bug ticket. Two failure classes deserve explicit review:
Test coverage and CI status are also unknown and should be treated as absent until proven otherwise.
Key questions.
database only, or also redis, file, cookie? Does it degrade or hard-fail on unsupported drivers?User model contract?AuthenticateSession, or does it replace/suppress it?Stack fit. Best fit is a conventional Laravel monolith on the database session driver with a single web guard and a first-party account settings area. Poor fit for API-first services where sessions are stateless tokens, and for apps on Redis sessions where the inventory model doesn't map to a queryable store without extra work.
Migration path. Do not adopt directly into a production auth path. Run a time-boxed spike — one engineer, two days — in a branch against a representative app, with three gates: (a) it installs and migrates without touching existing sessions or users schema in a breaking way, (b) the revoke endpoint is provably user-scoped under tampering, (c) the device inventory survives logout/login cycles correctly. If the spike reveals tight coupling to Liberu core, the right move is to vendor the package or reimplement the feature against framework primitives — the surface area is small enough that a rebuild is a credible fallback, which is an unusual and welcome risk mitigant. Budget roughly 2–4 days for a clean reimplementation if needed.
Compatibility. Pin the version explicitly in composer.json and audit with composer why and a license scan before merge. Check for migration filename collisions and for duplicate middleware registration. Confirm it doesn't override the framework's session service provider or silently change session lifetime/regeneration behavior — both are easy to miss and painful to diagnose later.
Sequencing.
Maintenance. This is the dominant cost. A single-maintainer, zero-adopter package on the auth path should be treated as code you own from day one, not code you consume. Plan to fork or vendor it, keep it in an internal namespace, and assign a named owner. Dependency upgrades (Laravel majors, PHP minors) will not be handled upstream on any schedule you can rely on.
Support. Assume self-support. There is no visible community, no adopter base to learn from, and unknown maintainer responsiveness. Internal documentation and a runbook are mandatory, not optional.
Scaling. Two pressure points. First, per-request write volume: if the module writes device metadata on every request, it compounds the existing cost of the database session driver and will show up in p99 latency under load. Second, table growth and query cost: the inventory and revoke queries need indexes on user ID and last-activity, and you need a pruning job with a defined retention window or the table grows unbounded. Validate both against your actual session concurrency before rollout, not after.
Failure modes.
Ramp-up. Low for a Laravel-fluent engineer — the domain concepts are familiar and the codebase is small; half a day to read and one to two days to assess meaningfully. The real ramp-up cost is organizational: someone must own the fork, the retention policy, and the security review, and that ownership needs to be explicit before the feature ships rather than after the first incident.
How can I help you explore Laravel packages today?