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

Bearer Laravel Package

ryangjchandler/bearer

A lightweight Laravel package for issuing and authenticating bearer tokens, letting you protect API routes with token abilities and expiration—no full OAuth setup required.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API authentication build-vs-buy: Bearer is the lean option in the Laravel auth spectrum (vs. Sanctum for SPA/cookie flows and Passport for full OAuth2). A PM can use it to justify not building token issuance, hashing, lookup, and middleware from scratch when the product only needs static, server-issued API tokens — saving an estimated sprint of auth plumbing plus ongoing security review surface.
  • Roadmap sequencing: The v2.1.1 release (Laravel 13.x compatibility) is a green light for scheduling a Laravel major-version upgrade on the roadmap without first budgeting an auth rewrite. Treat this as an unblocking dependency rather than a feature line item.
  • Feature gating / scoping decisions: Because token auth is handled at the package layer, "per-token abilities/scopes," "token revocation," and "expiry" become product decisions you can defer or include deliberately, instead of emergent side effects of a bespoke auth implementation.
  • Use cases it unlocks cheaply: public/partner API access, CLI and machine-to-machine clients, mobile app backends, and internal service-to-service calls where cookie/session auth is wrong-shaped. These are often the cheapest path to a "developer/API" revenue or integration story.
  • Support & lifecycle risk: A maintained release compatible with the current Laravel major is a signal for the dependency-risk register; an unmaintained one is a reason to escalate to buy/replace before it becomes an incident.

When to Consider This Package

Adopt when:

  • The product needs opaque, server-issued bearer tokens for API/machine clients — not browser session flows, and not delegated third-party authorization.
  • The team is already on Laravel and wants auth to feel native (middleware, guards, Eloquent) rather than a bolt-on.
  • You want a small dependency footprint with a narrow responsibility, and are comfortable owning the surrounding concerns: token issuance UX, rotation policy, rate limiting, audit logging, and scope design.
  • You need Laravel-version currency — v2.1.1 explicitly targets Laravel 13.x, so it fits a team on or migrating to the latest major.

Look elsewhere when:

  • You need OAuth2 (authorization code, refresh tokens, client registration, consent screens) — that's Passport or an external IdP.
  • You need first-party SPA or mobile session auth with cookies/CSRF — Sanctum is the better fit and is first-party, which matters for long-term support.
  • You need SSO / SAML / social or enterprise identity — this is an identity-provider decision, not a token-middleware one.
  • You require a guaranteed long-term support contract or vendor SLA — a single-maintainer community package carries concentration risk; budget for a fork/vendoring contingency.
  • Your architecture is not Laravel or is multi-framework — the value proposition largely evaporates.

How to Pitch It (Stakeholders)

For executives (one paragraph): We evaluated adding API token authentication to our product and found a small, actively maintained Laravel package that gives us secure bearer-token access for API and machine clients without a custom build. The latest release confirms compatibility with the current Laravel major version, which means we can take our planned framework upgrade without a parallel auth project. The recommendation is to adopt it for token-based API access and keep our identity strategy (SSO, OAuth) on a separate track — this is deliberately scoped to reduce cost and risk, not to replace our broader auth roadmap. Estimated saving is roughly one engineering sprint of initial build plus the recurring cost of owning security-critical auth code.

For engineering: Bearer is a narrow, single-purpose dependency — hashed token storage, a guard/middleware, and Laravel-native ergonomics. It is not a replacement for Sanctum (SPA/session) or Passport (OAuth2), and we should not stretch it into those roles. v2.1.1 is a compatibility-only release: no breaking changes, no new features, no migration work — it simply keeps us current with Laravel 13.x. Action items: pin the version, add a dependency-health check to our upgrade checklist (single-maintainer package), and make sure token expiry, revocation, abilities, rate limiting, and audit logging are explicitly owned by us, since the package intentionally does not solve those.

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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console