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 1mo ago

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 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

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

1020d 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

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)

PHPackages © 2026

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