marko / authentication-database
Database-backed password reset token storage for Marko Framework
Package info
github.com/marko-php/marko-authentication-database
Type:marko-module
pkg:composer/marko/authentication-database
Requires
- php: ^8.5
- marko/authentication: 0.13.0
- marko/database: 0.13.0
Requires (Dev)
- marko/cache-array: 0.13.0
- marko/database-mysql: 0.13.0
- marko/database-pgsql: 0.13.0
- marko/database-sqlite: 0.13.0
- marko/testing: 0.13.0
- pestphp/pest: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-03 19:13:56 UTC
README
Database-backed password reset token storage --- reset tokens survive cache flushes and auth:clear-reset-tokens deletes expired rows.
Installation
composer require marko/authentication-database
Requires marko/database and one of its drivers. Then run marko db:migrate to create the password_reset_tokens table from the entity the package ships.
Quick Example
use Marko\Authentication\Contracts\PasswordResetBrokerInterface; public function __construct( private readonly PasswordResetBrokerInterface $passwordResetBroker, ) {} public function forgotPassword(string $email): void { $this->passwordResetBroker->sendResetLink(['email' => $email]); }
Installing this package replaces the cache-backed PasswordResetTokenRepositoryInterface default of marko/authentication, so the broker stores tokens in the table. Schedule marko auth:clear-reset-tokens to delete expired ones.
Documentation
Full usage, API reference, and examples: marko/authentication-database