PHPackages                             drewlabs/passwords - 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. drewlabs/passwords

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

drewlabs/passwords
==================

Password resets implementation for drewlabs auth library

v0.2.20(2y ago)039MITPHPPHP ^7.1|^8.0

Since Jul 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/azlabsphp/password-resets)[ Packagist](https://packagist.org/packages/drewlabs/passwords)[ RSS](/packages/drewlabs-passwords/feed)WikiDiscussions master Synced today

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

Password Resets
===============

[](#password-resets)

Password reset is a workflow that allow application users to modify their connection credential a.k.a password while not being connected to the application. `drewlabs/passwords` is a framework agnostic password reset workflow for PHP programming language, that support `link` based and `otp` based password reset.

Usage
-----

[](#usage)

The library ships with command classes for creating password reset link/otp a.k.a `One Time Password`, and other commands to validated the generated token or otp.

- Request password reset

```
use Drewlabs\Passwords\Commands\CreatePasswordResetCommand;
use Drewlabs\Passwords\PasswordResetTokenRepository;
use Drewlabs\Passwords\UrlFactory;
use Drewlabs\Passwords\Contracts\TokenInterface;
use Drewlabs\Passwords\Contracts\CanResetPassword;

$repository = new PasswordResetTokenRepository(new Connection('sqlite:memory', 'password_resets'));
$command = new CreatePasswordResetCommand($repository, new CanResetPasswordProvider, 'MySecret');

// Create a password reset link
$command->handle('user@example.com', function(CanResetPassword $user, TokenInterface $token) {
    // TODOL: the command is completed, generate the password reset link
});

//
```

**Note** In the code above the `CanResetPasswordProvider` is a fake user resolver implementation. Library users must provide their own user resolver that implement `Drewlabs\Passwords\Contracts\CanResetPasswordProvider` contract.

- Generate password reset OTP

Documentation is under development, any API changes or feature will be added accordingly.

- Passsword reset token repository

The `drewlabs/passwords` library ship a reset tokens repository implementation that is extensible by creating drivers that implements `Drewlabs\Passwords\Contracts\ConnectionInterface` contract.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

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

Unknown

Total

1

Last Release

1068d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48c4973d500c7f4233d5ceacab51a57208d5fb60b0f95ae60264cf92380d0534?d=identicon)[azandrew-sidoine](/maintainers/azandrew-sidoine)

---

Top Contributors

[![azandrew-sidoine](https://avatars.githubusercontent.com/u/23530515?v=4)](https://github.com/azandrew-sidoine "azandrew-sidoine (24 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/drewlabs-passwords/health.svg)

```
[![Health](https://phpackages.com/badges/drewlabs-passwords/health.svg)](https://phpackages.com/packages/drewlabs-passwords)
```

###  Alternatives

[elfsundae/laravel-hashid

A simple, elegant way to obfuscate your data by generating reversible, non-sequential, URL-safe identifiers.

416260.7k2](/packages/elfsundae-laravel-hashid)[tuupola/branca

Authenticated and encrypted API tokens using modern crypto.

52330.8k1](/packages/tuupola-branca)[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)[lucatacconi/crunz-ui

User interface for lavary/crunz. Integrate Crunz library and funtions: Tabular, monthly or weekly interface to view the scheduled and executed tasks. Quick display of the execution result of the tasks that have been executed (Indicator icons easily show the result). Upload, download, edit or delete tasks. Forced run of the task, even outside the scheduled time with eventual display of the log once the execution is completed. It can be used with integrated Crunz or with a version of Crunz already installed on the system

151.5k](/packages/lucatacconi-crunz-ui)

PHPackages © 2026

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