PHPackages                             mretaa/laravel-auto-logout - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. mretaa/laravel-auto-logout

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

mretaa/laravel-auto-logout
==========================

Laravel Auto Logout is a Laravel package that automatically manages the logout of inactive users. It includes a Tailwind CSS modal that appears before logout to allow the user to end or extend their session.

v1.0.0(7mo ago)0431↓55.2%MITPHPPHP &gt;=8.1

Since Sep 19Pushed 7mo agoCompare

[ Source](https://github.com/mretaa/laravel-auto-logout)[ Packagist](https://packagist.org/packages/mretaa/laravel-auto-logout)[ RSS](/packages/mretaa-laravel-auto-logout/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Laravel-auto-logout
===================

[](#laravel-auto-logout)

**Laravel Auto Logout** is a Laravel package that automatically manages the logout of inactive users. It includes a **Tailwind CSS modal** that appears before logout to allow the user to end or extend their session.

✨ Features
----------

[](#-features)

- Automatic logout after a period of inactivity (configurable).
- Display of a *Tailwind modal* asking if the user wants to stay logged in.
- Configurable countdown before logout.
- Simple integration with a Blade @autoLogout directive.
- Middleware to enhance server-side security.

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require mretaa/laravel-auto-logout
```

⚙️ Configuration
----------------

[](#️-configuration)

Publish configuration files, views, and public assets:

```
php artisan vendor:publish --provider=“Mretaa\AutoLogout\IdleGuardServiceProvider”
```

This will create:

- config/idle-guard.php (package configuration)
- resources/views/vendor/auto-logout/ (modal view)
- public/vendor/auto-logout/js/ (JS script)

**Configuration example (config/idle-guard.php)**

```
