Anvil
Anvil - The mobile companion for Laravel Forge. Available now. Download for iOS

Introduction

Latest Version on Packagist Styling Tests Total Downloads

Welcome to the Laravel Authentication Log documentation!

I will do my best to document all features and configurations of this plugin.

Laravel Authentication Log is a comprehensive package which tracks your user's authentication information such as login/logout time, IP, Browser, Location, Device Fingerprint, etc. It sends out notifications via mail, slack, or SMS for new devices and failed logins, detects suspicious activity, provides session management, and much more.

Features

Core Features

  • โœ… Authentication Logging - Tracks all login/logout attempts with IP, user agent, location, and timestamps
  • โœ… Device Fingerprinting - Reliable device identification using SHA-256 hashing
  • โœ… New Device Detection - Automatically detects and notifies users of new device logins
  • โœ… Failed Login Tracking - Logs and optionally notifies users of failed login attempts
  • โœ… Location Tracking - Optional GeoIP integration for location data

Advanced Features

  • ๐Ÿ”’ Suspicious Activity Detection - Automatically detects multiple failed logins, rapid location changes, and unusual login times
  • ๐Ÿ“Š Statistics & Insights - Get comprehensive login statistics including total logins, failed attempts, unique devices, and more
  • ๐Ÿ” Session Management - View active sessions, revoke specific sessions, or logout all other devices
  • ๐Ÿ›ก๏ธ Device Trust Management - Mark devices as trusted, manage device names, and require trusted devices for sensitive actions
  • โšก Rate Limiting - Prevents notification spam with configurable rate limits
  • ๐Ÿ”” Webhook Support - Send webhooks to external services for authentication events
  • ๐Ÿ“ค Export Functionality - Export authentication logs to CSV or JSON format
  • ๐ŸŽฏ Query Scopes - Powerful query scopes for filtering logs (successful, failed, suspicious, recent, by IP, by device, etc.)
  • ๐Ÿšฆ Middleware - Protect routes with trusted device middleware