PHPackages                             omarpre/idle-timeout - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. omarpre/idle-timeout

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

omarpre/idle-timeout
====================

A Laravel package for alerting idle sessions about to expire - FORKED

v1.0.0(3y ago)0169MITVue

Since Sep 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/omarpre/idle-timeout)[ Packagist](https://packagist.org/packages/omarpre/idle-timeout)[ RSS](/packages/omarpre-idle-timeout/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

Idle Timeout Alert
==================

[](#idle-timeout-alert)

> A Laravel package for alerting idle sessions about to expire.

SESSION\_LIFETIME is great but how is the user supposed to know when the session is about to expire due to inactivity, especially if it is a low value? Furthermore, a user may be actively engaging the site (by clicking around or filling out a form) without ever sending a request to the backend. Laravel may end the session during this time without the user knowing.

When the session is about to expire, show a dialog so the user can choose not to be logged out.

[![](screenshot.png)](screenshot.png)

How it works
------------

[](#how-it-works)

This code doesn't actually log the user out. It still relies on Laravel's mechanism for expiring sessions. All it does is periodically check how much time before the session will expire and alert the user when it is almost time.

A demo library is at [omarpre/idle-timeout-alert-demo](https://github.com/omarpre/idle-timeout-alert-demo)

Installation
------------

[](#installation)

Laravel package and NPM dependencies

```
composer require omarpre/idle-timeout-alert
npm install --save idle-vue
```

Usage
-----

[](#usage)

### Disable "Remember Me" functionality

[](#disable-remember-me-functionality)

Step 1: Add the following line to `app/User.php`:

```
protected $rememberTokenName = false;
```

Step 2: Remove the "Remember Me" checkbox from your login form

### Publish and compile assets

[](#publish-and-compile-assets)

Step 1: Publish assets to vendor folder:

```
php artisan vendor:publish --provider="omarpre\IdleTimeoutAlert\IdleTimeoutAlertServiceProvider" --tag="vue-components"
```

Step 2: Add the following to your application's `resources/js/app.js`. Place within section where components are registered:

```
require('./../assets/vendor/omarpre/idle-timeout-alert/js/app');
```

Step 3: Compile

```
npm run dev
```

### Add component

[](#add-component)

Finally, add the component to any page where you would like the dialog. A good place is `layouts/app.blade.php`.

```

```

By default the dialog will only appear if the user happens to be idle when the session is about to expire. As long as user has activity, a ping will be sent in the background keeping the session alive.

If you would like to ignore user activity and have the dialog appear no matter what, then use the following:

```

```

If you want to allow a user to be on a particular page forever without ever timing out, then use the following:

```

```

As long as user is on the page, a ping will be sent in the background keeping the session alive and no dialog will ever appear.

Customization
-------------

[](#customization)

Feel free to make changes to the dialog in `resources/assets/vendor/omarpre/idle-timeout-alert/js/components/TimeoutDialog.vue`. Don't forget to recompile assets afterward!

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1340d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/65383832?v=4)[Nawaz Khan](/maintainers/nawazzz)[@nawazzz](https://github.com/nawazzz)

---

Top Contributors

[![jelib3an](https://avatars.githubusercontent.com/u/50533338?v=4)](https://github.com/jelib3an "jelib3an (12 commits)")[![omarpre](https://avatars.githubusercontent.com/u/104169030?v=4)](https://github.com/omarpre "omarpre (2 commits)")[![nawazm92](https://avatars.githubusercontent.com/u/26037518?v=4)](https://github.com/nawazm92 "nawazm92 (1 commits)")

### Embed Badge

![Health badge](/badges/omarpre-idle-timeout/health.svg)

```
[![Health](https://phpackages.com/badges/omarpre-idle-timeout/health.svg)](https://phpackages.com/packages/omarpre-idle-timeout)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
