saucebase/auth
Authentication package for Laravel and the Saucebase stack, providing a simple, flexible way to add login, registration, password resets, and session or token-based auth to your applications. Integrates cleanly with Laravel's guards, user providers, and middleware.
redirect()->intended(Home::url(...)) with a reason (login, registered, verified). That reason is the hook for routing new accounts into onboarding, activation, or a paywall — a decision you otherwise have to wire yourself.registration_enabled, magic_link_enabled, and enabled_socialite_providers are runtime settings, and disabled routes 404 rather than silently failing. You can gate signup per-environment or per-cohort without a deploy.modal_enabled swaps navbar links to modal entry points while keeping canonical pages. This makes the "does modal login convert better than a dedicated page?" question a settings toggle, not a sprint.impersonation.recent_history, max 4 IDs, 3 shown) is a real support-cost reduction — reproducing a user's bug in their own session instead of over a screen share. It also creates a privacy/audit obligation you should consciously accept.login_notification_enabled) and connected-account management in a separate Security panel are user-visible trust features, not just plumbing. They belong in release notes and pricing-page security copy.User does not implement MustVerifyEmail, so the verified middleware is a pass-through. Any roadmap item that assumes verified-email gating (marketplace trust, password recovery guarantees, outbound email reputation) is currently unbacked and needs an explicit decision.Consider it when:
Home::url(), core's settings modal, Filament, and tenancy's impersonation handoff — it is a module, not a standalone package.UPDATE (one-time use even under concurrent clicks), email_verified_at deliberately excluded from $fillable, logout restricted to POST with a documented reason, rate limiting at 5 attempts per email|ip with Lockout events, social-account linking that blocks takeover of an ID owned by another user, and a guard against disconnecting your only login method.Look elsewhere, or budget remediation, when:
AuthenticateSession in the web group — an app-wide change awaiting a regression pass (sc-714). This is a known security gap, not a bug.For executives: Authentication is the highest-consequence, lowest-differentiation code we will write. Getting it wrong is a breach headline; getting it right wins us nothing competitively. This module gives us a hardened baseline — password and social login, passwordless magic links, reset and verification, self-service account settings, and an admin impersonation tool that will measurably cut support time — for days of integration instead of weeks of senior engineering. It also hands us two levers we'd otherwise build: magic-link signup as a conversion experiment, and a modal-vs-page login toggle as a pure settings change. The honest caveat: nobody else uses this. Two stars, zero dependents. We would be adopting it as vendored code we own, and I need a named maintainer before we commit. Two functional gaps matter and are already documented: email verification is recorded but not enforced, and changing a password does not end other active sessions. Neither blocks a launch, both need a dated owner, and the second is a visible "we take security seriously" item for any enterprise buyer.
For engineering: This is a well-shaped module, not a demo. Token handling is correct — magic-link tokens are stored only as hashes and consumed in one atomic statement, so a database compromise yields no forgeable links and concurrent clicks can't replay. email_verified_at is out of $fillable, so no request payload can self-verify. Social linking refuses to attach an identity already owned by another user, and disconnection is refused when it's the only login method. Impersonation asks can('impersonate', $target) in all three entry points, admins are unpoliced-out of reach, and nobody can delete their own account. Two things to budget for before you commit: (1) enable MustVerifyEmail and actually enforce verified — it's currently a pass-through with the import commented out; (2) close sc-714 so a password change invalidates other sessions, which requires AuthenticateSession in the web group plus a regression pass. Also accept the coupling: this depends on the core settings modal, Home::url(), Filament, and tenancy's impersonation handoff. If we're not on that stack, the extraction cost exceeds the value. Review skills/saucebase-auth-development/SKILL.md before touching anything — it documents the non-obvious invariants (why logout is POST-only, why login opens in a modal only when the header is present, why password-change sessions are still open).
How can I help you explore Laravel packages today?