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

Sanctum Tokens Laravel Package

metasync-site/sanctum-tokens

Manage Sanctum API tokens from the command line: list, create, rotate, and revoke tokens for any user, with expiry controls and a clean Artisan interface for Laravel apps.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Admin/ops self-service for API credentials. If your product exposes a REST API to customers or internal teams, this package lets a Nova operator mint a Sanctum personal access token against a user record directly from the admin panel, without a support engineer running artisan tinker or a bespoke one-off script.
  • Build vs. buy for internal tooling. The scoped feature here — a Nova field/action that wraps $user->createToken(...) with name, abilities, and expiry inputs — is on the order of a few hours of internal work. This package is a candidate "buy" only because the price is zero and the scope is genuinely small; treat it as a starting reference implementation more than a dependency.
  • Roadmapping signal for developer-facing auth. Repeated internal requests to "generate a token for customer X" are a leading indicator that you need a first-class token management surface (list, revoke, rotate, scope, audit) rather than ad-hoc issuance. This package does issuance; it does not solve lifecycle. That gap is your actual roadmap item.
  • Support-ticket deflection. Every manual token issue is a support task with a human in the loop. Enabling an operator to issue a scoped, expiring token through the panel converts a ticket into a 30-second self-service action — measurable as tickets-per-week and time-to-first-API-call for new integrations.
  • Security posture decisions. Choosing to expose token issuance in the admin panel is a policy decision, not just a technical one: who on staff can mint credentials, whether tokens must expire, whether abilities are constrained, and whether issuance is logged. Any adoption decision should be driven by those answers, not by the package.
  • Not supported: public-facing customer token self-service, OAuth flows, token rotation policy, or anything an end user touches. This is back-office tooling.

When to Consider This Package

Consider it when all of the following hold:

  • You are already on Laravel Nova (a paid license) and Laravel Sanctum, and you have no appetite for a custom Nova tool.
  • Token issuance is a rare, operator-driven action — a handful per week, performed by trusted staff — not a product surface.
  • You need expiry and ability scoping at creation time and are comfortable that revocation/audit may live elsewhere (Sanctum's own personal_access_tokens table, your logging stack).
  • You can vendor or fork it. With 4 stars and zero dependents, assume no upstream support and no security response process; budget for reading ~a few hundred lines of code and owning it.
  • You have a migration path: the underlying data is Sanctum's standard table, so swapping the UI layer later is cheap. That exit ramp is the main reason the dependency risk is tolerable at all.

Look elsewhere, or build in-house, when:

  • You are not on Nova — the package is meaningless without it, and Nova's license cost dwarfs the value here.
  • You need the full lifecycle: listing active tokens per user, revocation UI, rotation reminders, per-token audit trail, rate limits, or IP restrictions. Sanctum exposes the primitives; this package surfaces only creation.
  • You need a maintained dependency with a security disclosure channel — a single-author package with 4 stars and zero dependents does not qualify.
  • Your token issuance is high volume or customer-facing, where UI correctness, authorization checks, and auditability are product-critical rather than convenience features.
  • You have a policy that credentials must never be mintable from a web UI, in which case a CLI/runbook path is the right answer and this package is a liability.

Given the scores here — opportunity 38.96, overall 0.05, zero dependents — the honest read is: low adoption risk is high, opportunity is narrow but real for the specific Nova + Sanctum + small-team combination. Our default recommendation is to spend the few hours and build it internally, using this repository as a reference for the Nova field wiring.

How to Pitch It (Stakeholders)

For executives (one paragraph): A small open-source add-on that lets our support and solutions staff issue API access tokens to customers from the admin panel we already pay for, instead of filing an engineering request each time. It removes a manual step from customer onboarding and shortens time-to-first-API-call. The package itself is tiny, free, and unmaintained — four stars, no downstream users — so the recommendation is not to depend on it, but to spend roughly one engineer-day replicating what it does and owning it. The strategic value is the workflow, not the code: it tells us we have an unserved need for token lifecycle management, and it is a cheap probe before we commit roadmap to a proper credentials feature.

For engineering (what we're actually asking for): Evaluate the Nova field/action patterns in this repo, then implement issuance in-house against Sanctum's createToken with mandatory expiry, explicit ability selection, and an audit log entry per issuance. Do not add it as a Composer dependency. Confirm the authorization gate (which Nova roles can mint tokens), confirm tokens are revocable through an existing surface or add one, and confirm we are not silently creating non-expiring tokens. If the internal build exceeds ~2 days, revisit buying — but at that point the requirement has grown beyond what this package does anyway.

Bottom line: Useful as a design reference and a signal of demand; not a dependency. Low cost either way, which is the only reason it is worth a look at all.

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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource