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

Laravel Redis Auth Laravel Package

usmonaliyev/laravel-redis-auth

Laravel Redis Auth adds Redis-backed authentication to Laravel, enabling fast, scalable user login and auth data storage through Redis instead of a traditional database user provider. It integrates with Laravel’s auth guard and provider system.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for the auth persistence layer. This package is a working reference implementation of a Redis-backed guard/provider for Laravel. It answers the question "what does it actually take to move credentials, tokens, and session lookups off the primary database?" in a few hundred lines instead of a multi-week design exercise. Treat its value as informing the decision, not settling it.
  • Datastore architecture for authentication. Whether identity checks belong in Postgres/MySQL (durable, queryable, transactional) or Redis (fast, TTL-native, operationally simpler at scale). The package narrows the debate to concrete tradeoffs: read latency, connection pooling, failover behavior, and what happens to logged-in users when Redis is unavailable.
  • Scaling and cost roadmap. If auth checks are a meaningful share of primary-database read volume, offloading them is a cheap capacity win with no schema migration. This supports roadmap items like "support 10x API traffic without a database tier upgrade" or "reduce p95 auth latency."
  • API and machine-to-machine credential strategy. Short-lived tokens, revocation lists, and per-key counters map naturally onto Redis key expiry. Useful input for a decisions doc on token TTLs, rotation, and revocation SLAs.
  • Platform standardization. A direct input to the standing "do we extend Laravel first-party auth (Breeze/Jetstream/Sanctum/Passport) or maintain a custom guard?" decision. Adoption here means opting out of the first-party upgrade path for that surface area.
  • Feasibility for edge/serverless or Eloquent-light deployments. Confirms whether a Laravel service can run authentication without a relational database in the request path.
  • Supply-chain risk tolerance for auth code. Release 1.5.1 renamed the public connection() method on the RedisAuthentication trait to redisAuthConnection() and shipped it as a patch version. The rename is small and arguably an internal cleanup, but it is a signature change in the exact trait a custom guard would extend, delivered without a major-version bump or a deprecation shim. That is now a concrete data point in the "fork and own it" column of the build-vs-buy decision, not a hypothetical.

When to Consider This Package

Adopt or, more likely, evaluate it when:

  • Redis is already an operational dependency with monitoring, failover, and a named owner — you are not adding a new tier for this.
  • Authentication is read-heavy and latency-sensitive: per-request token validation, high-QPS APIs, or gateways doing pre-flight checks.
  • Your identity model is deliberately small — credential verification plus token issuance — and you are not trying to replicate a full identity provider.
  • You need a seed implementation: you intend to vendor or fork it, add tests, and own the code. It is a starting point, not a dependency you can lean on.
  • You need TTL-native behavior (auto-expiring sessions, sliding token lifetimes, rate-limit counters co-located with auth data) that is awkward in SQL.

Look elsewhere when:

  • Durability and compliance matter. Redis is in-memory-first; AOF/RDB settings determine how many sessions or credentials you can lose. If "users randomly logged out" or "credential store lost data" is a reportable incident, this needs a hardened persistence design or a different store.
  • You need standard identity features — password reset, email verification, 2FA, social login, audit logs, account lockout policies, session management UI. None of that is in scope here; you would rebuild it.
  • Your team is Eloquent-centric. Losing model relationships, migrations, and query tooling for the user table raises onboarding and debugging cost more than the latency win typically repays.
  • You require a supported dependency with predictable upgrade semantics. Seven stars, zero dependents, a single maintainer, a last feature-level release in September 2024, and a method rename shipped under a patch number mean you cannot treat version constraints as a safety contract. Any consuming code that extends the trait or overrides connection() must be checked and patched on upgrade.
  • You are on a first-party path with Sanctum/Passport/Breeze and no scaling pressure that justifies divergence.

How to Pitch It (Stakeholders)

To executives: This is a small, MIT-licensed package — no procurement, no license fee, no vendor lock-in — that demonstrates how to move authentication traffic off our primary database and onto Redis, which we already run. The potential upside is lower auth latency and delayed database scaling costs, not new revenue. The honest downside is unchanged and now slightly sharper: it is an unproven, single-maintainer project with essentially no adoption, and its latest patch release (1.5.1) renamed a public method without a major-version bump, which tells us upgrade hygiene is not something we should rely on. So I am still not recommending we depend on it as a third-party package. I am recommending a time-boxed spike (roughly one to two weeks of one engineer) to validate the approach against our real traffic, then a build-or-adopt decision where we fork, pin, and own the code if it proves out. That gives us the option value without taking on unmanaged supply-chain risk.

To engineering: It gives us a Redis-backed guard and user provider out of the box — credential storage, token issuance, and TTL-based expiry — aligned with infrastructure we already operate. It is small enough to read end-to-end in an afternoon, which is the point: use it as a reference or a fork base, not a black box. Note the 1.5.1 change: the connection() method on the RedisAuthentication trait is now redisAuthConnection(). If we fork, we absorb that rename once and stop caring; if we ever track upstream, we need to treat every bump as potentially breaking regardless of the version number. Before anything ships we need our own test suite, a documented failover story for Redis outages (fail-closed vs. fail-open is a product decision, not just an infra one), a persistence configuration review, and a migration and rollback plan for existing users. If the spike shows the approach is sound, we own the resulting code.

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