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

Jwt Laravel Package

f21/jwt

f21/jwt adds JSON Web Token authentication to Laravel applications, providing a JWT guard, token generation and validation, middleware for protecting routes, and helpers for stateless API authentication without relying on sessions. It integrates with Laravel’s auth system and supports API token work...

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API authentication strategy: Choosing between stateless JWT tokens and session/cookie auth (Laravel Sanctum) or full OAuth2 (Passport). A JWT library is only relevant if you have consciously chosen stateless tokens.
  • Build vs. buy for token handling: Using a library to sign/verify JWTs versus writing custom crypto. Buying (adopting a library) is almost always correct for security primitives; the real decision is which library.
  • Service-to-service and third-party integration: Enabling signed assertion flows (SSO, webhooks, machine-to-machine auth) where JWT is the interchange format mandated by an external party.
  • Dependency risk and roadmap planning: The package is archived, which converts an auth decision into a technical-debt item. This directly informs roadmap capacity for containment, pinning, or migration.
  • Use cases it can serve: short-lived access tokens, stateless API gateways, token exchange between internal services, and verifying tokens issued by an upstream identity provider.

When to Consider This Package

Consider it only under narrow conditions:

  • You need low-level JWT encode/decode without a full auth framework, and the surrounding application already owns session/identity logic.
  • You are maintaining a legacy codebase that already depends on it and need a short, contained runway before migration.
  • You have a hard requirement for a specific algorithm or claim format and have verified this library supports it.

Look elsewhere when:

  • Starting a new Laravel application — use Sanctum or Passport for first-party auth, or a maintained general-purpose JWT library (e.g., firebase/php-jwt) for raw tokens.
  • You need security patching. Archived status means no CVE response, no PHP-version compatibility updates, and no algorithm-deprecation fixes. For an auth primitive, this is a material risk.
  • You need framework integration — middleware, guards, refresh flows, and key rotation are not provided here.
  • Adoption criteria to apply before any decision: maintenance status, security response process, supported PHP versions, algorithm coverage (HS256/RS256), key-rotation support, and test coverage. This package fails the first and most important criterion.

If retained, treat it as a frozen dependency: pin the version, isolate it behind an internal token interface, and schedule an exit.

How to Pitch It (Stakeholders)

To executives: This is a small, single-purpose utility for handling authentication tokens, not a platform or differentiator. Its strategic value is low, and its archived status makes it a security and maintenance liability in any customer-facing auth path. Recommendation: do not standardize on it; budget a modest migration if it is already in production.

To engineering: It is a thin JWT encoder/decoder. It does not give us guards, middleware, refresh flows, or key rotation — we would build those ourselves. Because it is unmaintained, we should wrap it behind an internal TokenService interface so the underlying library is swappable, and plan to replace it with a maintained library or Laravel-native auth. Adopting it directly into new code multiplies future migration cost for negligible present benefit.

Bottom line: Low adoption confidence (32 stars, archived, unknown repository). Suitable only as a contained legacy dependency — not a foundation for new authentication work.

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib