PHPackages                             l0max/password-history-checker - 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. l0max/password-history-checker

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

l0max/password-history-checker
==============================

Password history checker in laravel

v1.0.1(1y ago)13MITPHPPHP ^7.1.3|7.2.\*|7.3.\*|7.4.\*|8.\*

Since Jan 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/L0MAX/laravel-password-history-checker)[ Packagist](https://packagist.org/packages/l0max/password-history-checker)[ Docs](https://github.com/l0max/laravel-password-history-checker)[ RSS](/packages/l0max-password-history-checker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Password History Checker
========================

[](#password-history-checker)

[![Latest Version](https://camo.githubusercontent.com/a0f0760d90f8bdcc17b7c1425888ef7e6b44f159988150ded2bcf7d1cdaaa2e0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f4c304d41582f6c61726176656c2d70617373776f72642d686973746f72792d636865636b65722e7376673f7374796c653d666c61742d737175617265)](https://github.com/L0MAX/laravel-password-history-checker/releases)[![Total Downloads](https://camo.githubusercontent.com/5a7eefa62a9f4b061360147260a262077ab5324bb371521765cd8f03aaccb659/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c306d61782f70617373776f72642d686973746f72792d636865636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/l0max/password-history-checker)

A Laravel package that prevents users from resetting their password to one they have used before. This package ensures that password reuse is restricted by checking against a history of previously used passwords.

Features
--------

[](#features)

- Prevents users from reusing old passwords.
- Customizable password history depth (how many previous passwords to check).
- Simple integration with Laravel's built-in authentication system.

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

[](#installation)

To install the package, run the following command:

```
composer require l0max/laravel-password-history
```

Configuration
-------------

[](#configuration)

After installation, you need to publish the configuration file to customize the package behavior:

```
php artisan vendor:publish --tag=password-history-checker-config
```

This will publish a configuration file named `password-history-checker.php` in your `config` directory. You can modify the number of passwords to keep in history and customize other settings.

The configuration file looks like this:

```
return [
    'password_history_count' => 5, // The number of previous passwords to check
];
```

Usage
-----

[](#usage)

### Middleware Setup

[](#middleware-setup)

To prevent users from using previous passwords when resetting their passwords, add the middleware provided by this package to your password reset routes.

In your `routes/web.php` or `routes/api.php`:

```
use L0MAX\PasswordHistoryChecker\Middleware\PreventPasswordReuse;

Route::post('/password/reset', 'Auth\ResetPasswordController@reset')
    ->middleware(PreventPasswordReuse::class);
```

This middleware will ensure that users cannot reuse any of the last `password_history_count` passwords they have used.

### How it Works

[](#how-it-works)

The package checks a user's password against their previous passwords before allowing them to reset it. You can configure how many previous passwords are stored in the history by modifying the `password_history_count` in the configuration file.

The system uses a `password_histories` table to store the history of passwords for each user.

Running Migrations
------------------

[](#running-migrations)

The package includes a migration that adds a table to store the password history. Run the migrations after installing the package:

```
php artisan migrate
```

This will create a `password_histories` table to store user IDs and hashed passwords. This table is used to check previous passwords during the password reset process.

Testing
-------

[](#testing)

To run the package's tests:

```
composer test
```

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

```

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance41

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Every ~0 days

Total

2

Last Release

495d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.0

v1.0.1PHP ^7.1.3|7.2.\*|7.3.\*|7.4.\*|8.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/02ce737efc37fcb3ef932cdc897676a20be93a61b9293753454e5702ea383967?d=identicon)[L0MAX](/maintainers/L0MAX)

---

Top Contributors

[![L0MAX](https://avatars.githubusercontent.com/u/38319814?v=4)](https://github.com/L0MAX "L0MAX (9 commits)")

---

Tags

phplaravellaravel-packageLaravel Securitylaravel-loginlaravel-authenticationlaravel-password

### Embed Badge

![Health badge](/badges/l0max-password-history-checker/health.svg)

```
[![Health](https://phpackages.com/badges/l0max-password-history-checker/health.svg)](https://phpackages.com/packages/l0max-password-history-checker)
```

###  Alternatives

[imanghafoori/laravel-password-history

A package to keep a history of all password changes of users

70190.9k1](/packages/imanghafoori-laravel-password-history)[imanghafoori/laravel-masterpass

A minimal yet powerful package to help you easily impersonate your users.

367244.1k](/packages/imanghafoori-laravel-masterpass)[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k16.4M48](/packages/lab404-laravel-impersonate)[santigarcor/laratrust

This package provides a flexible way to add Role-based Permissions to Laravel

2.3k5.4M43](/packages/santigarcor-laratrust)[imanghafoori/laravel-tokenize-login

Helps you generate and send a random token to have passwordless login.

83214.7k](/packages/imanghafoori-laravel-tokenize-login)[pallant/laravel-aws-cognito-auth

An authentication driver for Laravel for authenticating users in AWS Cognito User Pools

777.7k](/packages/pallant-laravel-aws-cognito-auth)

PHPackages © 2026

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