Weave Code
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 Auth Laravel Package

php-open-source-saver/jwt-auth

Laravel JWT authentication package (fork of tymondesigns/jwt-auth) maintained by PHP Open Source Saver. Provides the same API with a new namespace, easy migration, and adds new features and ongoing support. Full docs available online.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API-First Authentication Strategy: Adopt JWT for stateless, scalable authentication in Laravel/Lumen APIs, reducing server-side session storage overhead.
  • Microservices & Decoupled Architecture: Enable seamless authentication across microservices or SPAs (React, Vue) by leveraging token-based auth.
  • Roadmap for OAuth2/JWT Hybrid: Lay groundwork for future OAuth2 integration by standardizing JWT payloads and claims (e.g., sub, iat, exp).
  • Build vs. Buy: Buy—avoids reinventing JWT auth wheels while maintaining flexibility for custom claims/validation logic.
  • Use Cases:
    • Mobile apps (native/iOS/Android) needing secure, token-based auth.
    • Headless CMS or SaaS platforms requiring role-based access control (RBAC) via JWT claims.
    • High-traffic APIs where session persistence is a bottleneck.

When to Consider This Package

Adopt if:

  • Your Laravel/Lumen app requires stateless auth (e.g., APIs, SPAs, or microservices).
  • You need fine-grained token expiration/refresh (e.g., short-lived access tokens + long-lived refresh tokens).
  • Your stack includes Laravel 10–13 and PHP 8.1+ (active maintenance).
  • You prioritize security (blacklist revocation, custom claims, ECDSA/RSA support).
  • Your team lacks bandwidth to build JWT validation/issuance from scratch.

Look elsewhere if:

  • You’re using Laravel <10 or PHP <8.1 (package drops support).
  • Your auth needs session persistence (e.g., traditional web apps with user state).
  • You require OAuth2 out-of-the-box (consider league/oauth2-server or spatie/laravel-oauth-server).
  • Your use case demands complex social logins (e.g., Google/Facebook OAuth; use socialiteproviders).
  • You need multi-factor auth (MFA)—this package focuses on JWT, not MFA flows.

How to Pitch It (Stakeholders)

For Executives: "This package lets us standardize secure, scalable authentication for our APIs and mobile apps—reducing server load, improving performance, and enabling seamless integration with third-party services. It’s battle-tested (800+ stars), actively maintained, and aligns with modern architectures like microservices and SPAs. The MIT license means no vendor lock-in, and the team can customize token claims/validation as needed."

For Engineering: *"We’re adopting php-open-source-saver/jwt-auth to replace session-based auth with JWT, which is:

  • Stateless: No server-side session storage (scales horizontally).
  • Flexible: Supports custom claims, guard-specific TTLs, and refresh tokens.
  • Future-proof: Actively maintained (Laravel 13, PHP 8.4), with OAuth2/JWT hybrid potential.
  • Easy to migrate: Drop-in replacement for tymon/jwt-auth with minimal code changes. Trade-offs: No built-in MFA or OAuth2, but we can layer those on top. Let’s demo the token refresh flow and blacklist revocation in our next sprint."*

Key Metrics to Track:

  • API Latency: Reduced by eliminating session lookups.
  • Scalability: Horizontal scaling without session affinity.
  • Security: Token revocation via blacklist, customizable claims.
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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor