Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Reallysimplejwt Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Session vs. stateless auth for an API. This package makes the "stateless bearer token" branch cheap to evaluate. A PM can greenlight a spike in days and get real evidence on the tradeoffs that actually matter to the product — scaling reads, forced logout, "sign out all devices," token lifetime UX — before committing the architecture.
  • Build vs. buy for identity — and where the line sits. This is a JWT primitive, not an identity provider. It supports a "build a thin token layer ourselves" decision for internal services, mobile clients, and partner APIs. It does not support SSO, social login, MFA, or enterprise directory integration; those remain an IdP purchase (Auth0, Cognito, Keycloak, Entra) and should be scoped as a separate decision with a separate budget.
  • Roadmap sequencing. Because integration is measured in hours-to-days rather than weeks, it belongs behind a decision gate ("do we ship a public API or mobile client this half?") rather than in a pre-emptive platform build. Low cost of delay, low cost of reversal.
  • Concrete feature unlocks: API access tokens, short-lived signed links (email verification, password reset, magic links, invite/onboarding links), service-to-service assertions, time-boxed demo or partner tenants.
  • Security floor as a product input. The library enforces a minimum secret length and does the HMAC/signature work correctly, which raises the baseline for teams without a dedicated security engineer. That directly reduces the "we shipped a hand-rolled crypto bug" incident class — a risk-register item, not just an engineering preference.
  • Revocation and session-lifetime policy. Choosing JWTs forces the org to confront revocation, expiry, and refresh strategy, because this package deliberately doesn't solve them. That's a product decision (session length, forced re-auth, account-takeover response) you should make explicitly rather than inherit by accident.
  • Buy-vs-build pressure test on the ecosystem. 288 stars, zero listed dependents, and no release since April 2022 is the data point. The decision this supports is not "is it good code" (it is small, clean, MIT) but "are we willing to be an early adopter on a security-critical surface?"

When to Consider This Package

Adopt when:

  • You're a small-to-mid PHP/Laravel team on PHP 7.4/8.x and need to issue and validate JWTs — nothing more.
  • HMAC signing with a shared secret is acceptable: single service, or a small number of trusted services that can share a secret out-of-band.
  • You want a tiny, dependency-free, easily auditable surface — genuinely valuable if your security review process is lightweight or your team is small.
  • You're building an MVP, internal tool, or partner integration where time-to-learn matters more than ecosystem gravity.
  • You're willing to own key rotation, refresh-token storage, and revocation in your own application code.

Look elsewhere when:

  • Multiple services need to verify tokens independently. You need public-key distribution, kid headers, and JWKS — i.e., OIDC. Use an IdP, or lcobucci/jwt / web-token/jwt-framework if you must stay in-house.
  • You need encryption (JWE), ES256, or managed key rotation. Outside this library's intent.
  • Maintenance risk tolerance is low. No release in over three years on code whose entire job is security. firebase/php-jwt is the ecosystem default — actively maintained, vastly larger adoption — and should be the baseline you argue against, not the other way around.
  • You need refresh tokens, session/device management, revocation lists, or MFA. Out of scope by design.
  • You're on Laravel and the real need is first-party SPA/mobile auth. Sanctum (or Passport for full OAuth2) is probably the better product answer; this library would be solving a lower-level problem you don't have.
  • You're pursuing SOC 2 / ISO / enterprise procurement that expects maintained dependencies or a security SLA.

Recommendation if adopting: pin the exact version, wrap it behind a single in-house TokenService interface, and set a review checkpoint (e.g., two quarters). The wrapper makes a swap to firebase/php-jwt or an IdP a one-file change, which converts a maintenance risk into a scheduling cost.

How to Pitch It (Stakeholders)

To executives: This is a free (MIT), zero-dependency, ~small-surface PHP library that lets us ship token-based authentication in days rather than weeks, with no license cost and no vendor lock-in. Its main business value is risk reduction: it removes the most common way small teams introduce auth vulnerabilities — hand-rolled signing and validation — and enforces sane defaults like minimum secret length. Be clear about what it is not: it is a component, not an identity platform. It does not give us SSO, MFA, or enterprise login. If the roadmap includes enterprise customers or a public developer API, we will still need an identity provider decision and budget, and this library is not a substitute for it.

To engineering: Small, readable, auditable surface; straightforward builder/validator API; drops cleanly into Laravel; enforces a minimum secret length and handles HMAC signing and claim validation (expiration, not-before, issuer, audience, subject, custom claims) correctly. The honest caveats: last release April 2022, effectively a single maintainer, and no JWKS, key rotation, refresh, or revocation — we own all of that. Zero listed dependents means limited external validation; budget time to read the source and pin the version. Verify algorithm support against the version you pin rather than assuming.

Ask: Approve a time-boxed spike (≈2–5 dev days including the wrapper and tests) with an explicit exit criterion — if multi-service verification or SSO requirements appear, we migrate to an IdP or firebase/php-jwt behind the existing interface. That keeps the downside capped at the cost of the wrapper while preserving the speed benefit now.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator