rappasoft/laravel-authentication-log
Authenticatable, HasApiTokens), event system (e.g., login, failed), and Eloquent ORM. This minimizes architectural friction and ensures seamless integration with existing Laravel applications.Authenticating, Authenticated, Failed), enabling extensibility via listeners or webhooks.User model and publishing migrations/config.is_trusted column).torann/geoip (for location tracking) or guzzlehttp/guzzle (for webhooks).HttpTests, FeatureTests), easing CI/CD integration.hash('crc32b')) if precision is less critical.torann/geoip with a local database (e.g., MaxMind) for performance.purge settings and ensure compliance with data deletion requests.prevent_session_restoration_logging feature relies on session cookies. Misconfiguration (e.g., short session_restoration_window_minutes) could lead to false positives (e.g., legitimate refreshes flagged as duplicates).user_id, created_at, ip_address.NewDeviceNotification) to avoid timeouts.authentication-log:purge.config/authentication-log.php to exclude sensitive fields.authentication-log:purge and ensure it aligns with retention policies.suspicious_activity checks) to reduce overhead.php artisan migrate) in staging first.Authenticating, Authenticated, Failed events for custom logic.RequireTrustedDevice to protect routes.suspicious_reason).torann/geoip for location tracking. Use a local database (e.g., MaxMind) for performance.laravel-notification-channels for Slack/SMS. Ensure channels are configured in config/services.php.guzzlehttp/guzzle for HTTP calls. Add retry logic for reliability.composer require rappasoft/laravel-authentication-log --dev
php artisan vendor:publish --provider="Rappasoft\LaravelAuthenticationLog\LaravelAuthenticationLogServiceProvider" --tag="authentication-log-migrations"
php artisan migrate
// config/authentication-log.php
'notifications' => [
'new_device' => false,
'failed_login' => false,
],
php artisan migrate
authentication_log table before migration.authentication-log:export) before decommissioning.Illuminate\Auth) and packages like Sanctum/Passport. For custom guards, extend the Authenticating event listener.session vs. api).AuthenticationLog::forUser($user) to filter logs by role.config/authentication-log.php defaults and customize:
purge (e.g., 365 days).notifications (disable initially).suspicious_activity thresholds.config/services.php.User model.php artisan vendor:publish --tag="authentication-log-migrations"
php artisan vendor:publish --tag="authentication-log-config"
How can I help you explore Laravel packages today?