Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Authentication Log Laravel Package

rappasoft/laravel-authentication-log

Laravel Authentication Log tracks user logins and logouts with IP, browser, location, and device fingerprint, sends alerts for new devices and failed attempts, and adds session management plus suspicious activity detection.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for "account security" surface area. A credible, MIT-licensed implementation of auth logging, device fingerprinting, new-device notifications, and session revocation collapses what is typically a 3–6 week build (schema, listener wiring, UA normalization, notification throttling, UI data endpoints) into a single composer require plus a trait and a migration. That is the core decision: spend engineering time on the differentiated product, not on table stakes security plumbing.
  • Roadmap sequencing for a trust-and-safety epic. The feature list maps cleanly onto a shippable ladder: (1) login audit log, (2) user-facing "recent activity / devices" page, (3) email-on-new-device, (4) session revocation and device trust, (5) suspicious-activity flagging and webhooks to internal tooling. Each rung is independently valuable and independently demoable, so it can be sequenced behind other priorities without blocking on the whole epic.
  • Packaging and monetization decisions. Device trust management and RequireTrustedDevice middleware make a natural gate for a higher-tier plan (e.g., "enforce trusted devices for sensitive actions" for enterprise/team tiers) or as a differentiator in security-questionnaire-driven sales. Session revocation and export are commonly listed compliance asks in RFPs — knowing they're ~one sprint with this package changes pricing and positioning conversations.
  • Compliance and procurement posture. Export to CSV/JSON plus query scopes (fromIp, recent, failed, forUser) supports audit-evidence and data-subject-access requests without a bespoke admin tool. It gives a defensible answer to "how do you detect and log unauthorized access?" in SOC 2 / ISO 27001 / security-review conversations — useful, though not sufficient on its own (see caveats below).
  • Support-cost and account-takeover decisions. New-device and failed-login notifications, plus self-serve session revocation, move a class of "was this you?" support tickets to self-service and give users a recovery path that doesn't require a human. That's a measurable reduction in ticket volume and a reduction in ATO blast radius.
  • Incident-response readiness. Webhook support (login, failed, new_device, suspicious) means security events can be piped to Slack, PagerDuty, or an internal SIEM-lite without building an event bus first — a decision that can be made after adoption, not before.
  • Buy-with-eyes-open decision. Because it's MIT and small, the honest framing is "adopt as a dependency, budget for a fork/maintenance contingency," not "adopt as a vendor relationship." That's a real product-org decision about acceptable third-party risk.

When to Consider This Package

Good fit when:

  • The product is Laravel 11.x, 12.x, or 13.x with PHP 8.2+, standard Eloquent Authenticatable user model, and conventional session-based auth. Version 13.x requires 6.1+; Laravel 10 and below should use 3.x, which lacks the modern feature set — don't adopt the new capabilities there.
  • You want a user-facing security page (devices, active sessions, "log out everywhere") and user-facing new-device emails, not just internal logs.
  • You are a small-to-mid team without an existing SIEM, IdP-level audit trail, or dedicated security engineering capacity.
  • You value shipping in days over controlling every line of the implementation, and you're comfortable pinning a major version.
  • You need the heuristics of suspicious-activity detection (failed-login threshold, rapid country change, unusual hours) rather than genuine anomaly modeling.

Look elsewhere when:

  • You need a tamper-evident or warehouse-grade audit trail (append-only storage, retention guarantees, cross-service correlation). This writes to your application database; it is an operational log, not an immutable compliance ledger.
  • You need enterprise-identity-grade audit (SSO/SCIM/IdP sign-in events, MFA challenge telemetry, admin-action auditing across the whole app). This covers authentication events for your Eloquent users only.
  • You're multi-tenant with strict data isolation requirements — the default single authentication_log table and scopes will need real design work, and that work is on you.
  • You need a vendor with an SLA, indemnity, or security review package. Single-maintainer OSS with low visible ecosystem adoption (stars ~1k; Dependents: 0 reported) means the maintenance risk lands on your team. Stars are a weak proxy, but the absence of broad downstream usage is a signal to plan for self-sufficiency.
  • GeoIP/location matters legally. Location tracking is optional and depends on a third-party GeoIP service; that's an added DPA/subprocessor and privacy-notice obligation, and results are approximate. If precise location or IP-reputation intelligence is required, this isn't the tool.
  • You need real-time prevention — device trust middleware gates routes, but blocking a login mid-attempt, step-up MFA, or risk-based authentication is out of scope.
  • Someone is proposing this as a substitute for MFA or password policy. It is detective and reactive; it does not prevent credential compromise on its own.

Adoption guardrails to set before committing: pin the major version, verify the upgrade migration path (v3→v6 adds columns to an existing table — test on a production-like copy), decide retention and PII policy for IP/UA/location data up front, and confirm the notification channels (mail, Slack, SMS) your plan actually has configured. Rate limiting on notifications is configurable but must be tuned, or new-device emails become noise and users start ignoring them — which silently destroys the security value.

How to Pitch It (Stakeholders)

To executives (one paragraph): We can deliver the account-security features customers and security questionnaires keep asking for — login history, "new device" alerts, active-session visibility, remote logout, suspicious-login flagging, and audit export — in roughly one sprint instead of one or two quarters of custom work. It's MIT-licensed with no per-seat or subscription cost, so there's no vendor negotiation, no lock-in, and no incremental COGS. The trade-off is that it's a focused open-source component maintained by a small team, so we treat it as a dependency we own the risk on: we pin the version, keep the surface area thin (trait, migration, config), and accept that if upstream stalls we can fork it — the code footprint is small enough that this is a realistic fallback, not a bluff. Recommended decision: adopt now for the audit-log and device-visibility layers, defer the suspicious-activity heuristics and trusted-device enforcement until we've validated notification volume and false-positive rates with real users.

To engineering (the ask): One trait on the User model, one published migration, one config file, and optional route middleware. It provides the tables and query scopes so we mainly build UI and product logic on top. Key work items are ours, not theirs: retention/PII policy for stored IP and user-agent data, notification throttling tuning, deciding whether GeoIP is worth the third-party dependency, and an upgrade test against a snapshot of the production schema. Pin the major version and note the Laravel/PHP floor (11+/8.2+) in our dependency policy; if we're still on Laravel 10, this becomes a post-upgrade item and the modern features aren't available to us.

Honest limitations to state up front: it's detective, not preventive; suspicious-activity detection is rule-based heuristics, not risk scoring; it logs authentication events in our database, not a compliance-grade immutable ledger; and it is not a replacement for MFA, SSO, or a real security-monitoring stack. Positioned correctly — as the fastest credible path to a user-facing security and session-management surface — the value case is strong and the risk is contained.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
muka/shape-reader
tdt/json
refinery29/php-cs-fixer-config
hotmeteor/eco-env
mvaliolahi/hydrate
wearede/tbcpay-php
parsnick/steak
thibaud-dauce/mattermost-php
multilinguals/apollo-client
antaresbr/collection
kr0lik/phpstan-rules
loco/loco
starfederation/datastar-php
yupmin/modern-phystrix
stephenjude/extended-artisan-commands
lumphp/laravel-macroable
lumphp/laravel-collections
lumphp/laravel-contracts
sermepa/sermepa
arkecosystem/fortify