sobstel/sesshin
Sesshin provides encrypted, authenticated session storage for PHP. It transparently encrypts session data with libsodium or OpenSSL, keeping contents unreadable in files, Redis, or databases while staying compatible with PHP's native session handling.
session_start() plus middleware for regeneration, fingerprinting, and expiry. Sesshin packages those behaviors as a dependency; the decision hinges on whether your team's time is better spent maintaining ~200 lines of session glue or auditing an unmaintained MIT library. For a framework-agnostic legacy PHP estate, "buy" (adopt + vendor) is usually cheaper than "build."Consider it when all of the following hold:
Look elsewhere when:
session()->regenerate() / invalidate() for fixation, configurable lifetime and expire_on_close, and database/Redis drivers. A small AuthenticateSession-style middleware plus config covers most of what Sesshin offers, with zero new third-party risk. Adding an unmaintained, framework-agnostic session library underneath or alongside Laravel's session stack is a conflict-prone integration.To executives: this is a low-cost, MIT-licensed option to close a known session-security finding in our legacy PHP surfaces without a framework migration. It is not a strategic dependency — no lock-in, no license cost, no data leaving our infrastructure. The honest trade-off is maintenance risk: the project has been dormant since 2018. So the recommendation is to adopt it as vendored, internally owned code — fork it into our repo, audit it, add tests — and treat the fork as ours to maintain. Budget a short spike (a few engineer-days) to verify PHP compatibility and security-review the session-handling logic before it touches anything user-facing. If that spike reveals incompatibility, the fallback is a small internal wrapper achieving the same controls at modest additional cost.
To engineering: it is a framework-agnostic session manager that centralizes ID regeneration, session fingerprinting, payload protection, and configurable expiry — useful precisely where we don't have a framework session layer doing this for us. Treat it as untrusted input: pin a commit, vendor it, run it against our PHP version in CI, and wrap it behind our own thin interface so we can swap the implementation later. Do not layer it on top of Laravel's session machinery — there, use the framework primitives and a custom middleware instead.
How can I help you explore Laravel packages today?