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

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

chrysanthos/password-history
============================

Laravel password history

4.0.1(3y ago)291MITPHPPHP ^8.0|^8.1CI failing

Since Jan 13Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/chrysanthos/password-history)[ Packagist](https://packagist.org/packages/chrysanthos/password-history)[ Docs](https://github.com/chrysanthos/password-history)[ RSS](/packages/chrysanthos-password-history/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (3)Versions (8)Used By (0)

Password history for Laravel
============================

[](#password-history-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/213d38cc1a09567d0279885e55c5518a611473ad4fbb110d60bcce8f44ea6a26/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4368727973616e74686f732f70617373776f72642d686973746f72792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chrysanthos/password-history)[![GitHub Tests Action Status](https://camo.githubusercontent.com/2d052deef88b48503521627891a195a8b99eeeebdf37bb09949082fc2c5cbd97/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6368727973616e74686f732f70617373776f72642d686973746f72792f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473)](https://github.com/chrysanthos/password-history/actions?query=workflow%3Arun-tests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/de0b844ba378105f7a93369388a3627989a53524df14c1590444d49ac9688830/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6368727973616e74686f732f70617373776f72642d686973746f72792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chrysanthos/password-history)

The Laravel package maintains encrypted user password history so that you can prevent users from using a previously used password.

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

[](#installation)

You can install the package via composer:

```
composer require chrysanthos/password-history
```

Usage
-----

[](#usage)

The package service provider is registered automatically and a migration is provided to be run.

Run your migrations

```
php artisan migrate
```

In your `App\Http\Controllers\Auth\ResetPasswordController` override Laravel's default `rules` method with the following

```
    use Chrysanthos\PasswordHistory\Rules\NoOldPasswords;

    /**
     * Get the password reset validation rules.
     *
     * @return array
     */
    protected function rules()
    {
        return [
            'token' => 'required',
            'email' => 'required|email',
            'password' => [
                'required', 'confirmed', 'min:8',
                new NoOldPasswords(User::whereEmail(request('email'))->first()->id, request('password'))
            ],
        ];
    }
```

Note: In case you changed the default Laravel auth `ResetPasswordController` you will need to dispatch the `PasswordReset` event that Laravel includes out of the box.

```
    use Illuminate\Auth\Events\PasswordReset;

    event(new PasswordReset($user));
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please send me a message on twitter (@chrysanthos\_cy) instead of using the issue tracker.

Credits
-------

[](#credits)

- [Chrysanthos Prodromou](https://github.com/chrysanthos)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance47

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 95.7% 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 ~183 days

Recently: every ~260 days

Total

7

Last Release

1213d ago

Major Versions

1.0.1 → 2.0.02020-03-09

2.1.0 → 3.0.02022-02-08

3.0.0 → 4.0.02022-10-27

PHP version history (3 changes)1.0.0PHP ^7.3

2.0.0PHP ^7.2

3.0.0PHP ^8.0|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e4c6e7361079cf5c5ac78f42bcfaeed5547826c3a81c682ccbbe40c04dc397c?d=identicon)[chrysanthos](/maintainers/chrysanthos)

---

Top Contributors

[![chrysanthos](https://avatars.githubusercontent.com/u/48060191?v=4)](https://github.com/chrysanthos "chrysanthos (22 commits)")[![sebdesign](https://avatars.githubusercontent.com/u/667144?v=4)](https://github.com/sebdesign "sebdesign (1 commits)")

---

Tags

hacktoberfestlaravelpassword-historylaravellaravel-packageLaravel Authlaravel-adminlaravel-authenticationpassword historyphp-package

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[lab404/laravel-impersonate

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

2.3k16.4M48](/packages/lab404-laravel-impersonate)[imanghafoori/laravel-masterpass

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

367244.1k](/packages/imanghafoori-laravel-masterpass)[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-tokenize-login

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

83214.7k](/packages/imanghafoori-laravel-tokenize-login)[hapidjus/laravel-impersonate-ui

UI for 404labfr/laravel-impersonate

371.5k](/packages/hapidjus-laravel-impersonate-ui)

PHPackages © 2026

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