Auth information

This package is auto-updated.

Last update: 2025-02-14 11:33:04 UTC


README

The Authinfo package provides a powerful and lightweight solution for logging and monitoring user authentication activities within your Laravel application. It records successful login and logout attempts, capturing essential details such as user ID, username, IP address, user agent, login/logout time, device type, and location. This package is designed primarily for admin use, allowing administrators to track and audit user activity securely.

⚠️ Security Warning

This package does not include any built-in security measures and is intended for admin use only. It exposes sensitive login user details, which could pose a security risk if accessed by unauthorized users. Ensure that this package is only used in a secure environment and not exposed to public or unauthorized access.

🏷️ #Authentication  #Security  #UserTracking  #Laravel  #PHP  #LoginMonitoring  #SecurityAudit  #ServerMonitoring  #DevOps  #AccessControl 

Documentation

Features

  • Tracks successful logins and logouts with essential details.
  • Logs user ID, username, and IP address for each authentication event.
  • Stores data in a dedicated login_logs database table.
  • Records user agent, login time, logout time, and device type.
  • Captures user location (based on IP address lookup).
  • Provides a built-in, responsive table UI for admin users.
  • Includes pagination and search functionality for easy record browsing.
  • Fully responsive design for both desktop and mobile views.
  • Easy installation with vendor publish and migration commands.
  • Supports Laravel 9, 10, and 11 with PHP 8+ compatibility.
  • Allows filtering login records based on date range and user search.
  • Lightweight and optimized for performance.
  • Provides an audit trail for login/logout activity monitoring.

Supported Versions

  • PHP: ^8.0
  • Illuminate Support: ^9.0 | ^10.0 | ^11.0

Installation

To install the package, open the terminal and run the following command:

composer require itpathsolutions/authinfo

Commands

Vendor Publish

Run the following command to publish the package configuration and migration files:

php artisan vendor:publish --provider="Itpathsolutions\Authinfo\AuthInfoServiceProvider"

Migrate

Run the migration command to set up the necessary database tables:

php artisan migrate

Accessing Login Logs

Once installed, open the following URL in your browser to check the plugin:

localhost:8000/login-logs

This table provides a searchable, paginated view of login and logout records, including username, IP address, device type, location, and timestamps.

FAQs

Frequently Asked Questions (FAQ)

1. What does this package do?

This package logs and monitors user login/logout activities, capturing details like user ID, IP address, device type, and timestamps.

2. How do I install the package?

You can install it using Composer with:
composer require itpathsolutions/authinfo

3. Which Laravel versions are supported?

This package supports Laravel 9, 10, and 11 with PHP 8+ compatibility.

4. Where are login logs stored?

All login and logout events are stored in the login_logs table in your database.

5. How do I view login logs?

You can access login logs via the following URL:
localhost:8000/login-logs

6. Can I customize the package?

Yes, you can publish the package’s configuration and views using:
php artisan vendor:publish --tag=authinfo-config

Contributing

We welcome contributions from the community! Feel free to Fork the repository and contribute to this module. You can also create a pull request, and we will merge your changes into the main branch. See CONTRIBUTING for details.

Security Vulnerabilities

Please review our Security Policy on how to report security vulnerabilities.

License

This package is open-source and available under the MIT License. See the LICENSE file for details.

Testing

To test this package, run the following command:

composer test

Get Support

  • Feel free to contact us if you have any questions.
  • If you find this project helpful, please give us a ⭐ Star.

You may also find our other useful package:

MySQL Info Package 🚀
PHP Info Package 🚀