praetoriantechnology/refresh-token-manager-bundle
A Symfony bundle for managing refresh tokens securely, with services and configuration for issuing, rotating, validating, and revoking tokens, plus storage integration for authentication workflows.
The first thing to know: this is a Symfony bundle (*-bundle is the Symfony naming convention), not a Laravel package. There is no Laravel service provider, no package auto-discovery entry, no publishable config/refresh-token-manager.php, and no facade. So "getting started" in a Laravel app really means deciding whether to port the concepts or the code.
If you're determined to try:
composer require praetoriantechnology/refresh-token-manager-bundle — and expect to lose an afternoon to dependency resolution. Laravel ships a pinned subset of symfony/* components; a bundle declaring its own range usually conflicts.src/DependencyInjection/ (the extension class reveals the full config tree and every knob), then src/Service/ (the issuing/validating/revoking services), then wherever tokens are persisted (src/Entity/ or src/Model/, almost certainly Doctrine).POST /token/refresh endpoint.The realistic getting-started is different: extract the token lifecycle from the source — issue → store → validate → rotate on use → revoke family on reuse — and reimplement it against the Laravel container and Eloquent. Treat the bundle as a reference implementation, not a dependency.
Since cleanly installing it into Laravel is unlikely, the patterns worth lifting are:
$this->app->singleton(...).RefreshTokenService or an action class, and fire a RefreshTokenIssued event for audit logging.RefreshTokenRepository contract bound to that model. Keeps the port swappable if you later adopt Sanctum.security.yaml firewalls. In Laravel, a guard or middleware that resolves the access token and returns a hint to /token/refresh on 401 is the equivalent shape.config/refresh-tokens.php, then inject via typed config rather than reading env() at call sites.Bundle base class and KernelInterface registration won't load either — it isn't a matter of writing a shim.symfony/* to its own minor version (Symfony 7 components on Laravel 11). A bundle requiring ^5.x or ^6.x components will fail composer update.EntityManagerInterface, entities, mapped superclasses, repository classes — none of this translates to Eloquent without a rewrite of the persistence layer.symfony/clock (ClockInterface) and a UUID factory. Swap for Carbon\CarbonImmutable and Str::uuid() if porting.Configuration tree. Error messages won't resemble Laravel's Validator, and php artisan config:cache has no bearing on it.EventDispatcherInterface, the event/ listener concept maps 1:1 onto Laravel's Event and Listen — the one genuinely reusable seam.bin/console debug:container and debug:config are Symfony-only; in a Laravel context you'll be reading services.yaml by hand.Bottom line: zero dependents and no stars means no community-tested Laravel path exists, and the framework mismatch is structural. For a Laravel codebase needing refresh tokens, the pragmatic move is to study this bundle's rotation and reuse-detection logic, then build on laravel/sanctum or tymondesigns/jwt-auth — both will cost substantially less than fighting a Symfony bundle's assumptions.
How can I help you explore Laravel packages today?