rbdwllr/reallysimplejwt
A lightweight PHP library for creating and verifying JSON Web Tokens through a clean, secure API. Really Simple JWT handles signing, validation, and expiration with minimal dependencies, making token-based authentication and stateless APIs straightforward to build.
Architecture fit
tymon/jwt-auth already provide guards, token persistence, and refresh flows.Token::create() directly inside controllers makes tests and secret-rotation logic hard to control. A thin injectable adapter interface bound in a service provider is effectively mandatory.Integration feasibility
composer require rbdwllr/reallysimplejwt and go. No PHP extensions beyond hash/json, no database, no network calls.Technical risk
kid-based key rotation, limited claim validation (exp/nbf/issuer; audience handling is minimal), no encryption (JWS only), no token revocation, no clock-skew/leeway configuration, no framework middleware.Key questions
firebase/php-jwt or lcobucci/jwt later?kid support?Stack fit
config/services.php or config/jwt.php reading env('JWT_SECRET'), never env() at call sites — config:cache will silently return null otherwise. Consider deriving from a secrets manager at boot for non-local environments.Migration path
Compatibility
psr/* versions that conflict with Laravel's HTTP stack.Sequencing
alg: none rejection, malformed-token behavior.Maintenance
Support
Scaling
kid header support, rotating the signing secret requires coordinated rollout and a dual-secret acceptance window in the adapter (accept old and new, issue with new) to avoid mass 401s.Failure modes
config:cache with env() called outside config files yields a null/empty secret — signature verification then fails at runtime, usually only in production.How can I help you explore Laravel packages today?