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

Filament Sanctum Laravel Package

devtical/filament-sanctum

Filament Sanctum adds a Filament panel for managing Laravel Sanctum API tokens. Create and view personal access tokens from the admin UI, with publishable config and translations for easy customization.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Accelerate Filament 5 adoption for modern Laravel projects: Now supports Filament 5 + Laravel 13, enabling teams to leverage the latest Laravel ecosystem (e.g., Laravel 13’s improved dependency injection, Filament 5’s revamped UI) while maintaining Sanctum auth integration. Critical for projects starting fresh or migrating to newer stacks.
  • Enhanced token lifecycle management: New expiration presets (7/30/60/90 days) and custom expiration dates reduce security risks by enforcing token rotation, aligning with compliance needs (e.g., GDPR, SOC 2). Supports SaaS multi-tenancy where temporary API access is required.
  • Granular access control: Authorization gates allow restricting the Sanctum panel to specific roles (e.g., "Admin" or "API Manager"), reducing privilege creep in shared environments. Ideal for B2B platforms or internal tools with role-based workflows.
  • Build vs. Buy refinement: Justifies "buy" for teams needing token expiration + Filament 5 compatibility without reinventing the wheel. Estimated savings: 15–25 dev hours (token UI + expiration logic + Filament 5 migration).
  • Roadmap alignment:
    • Legacy system modernization: Bridge old Sanctum APIs to Filament 5’s UI with minimal refactoring.
    • API-first SaaS: Enable 3rd-party integrations via temporary tokens (now with configurable lifespans).
    • Internal tool security: Secure self-service portals (e.g., support dashboards) with audit-ready token revocation.
  • Use cases (expanded):
    • Compliance-driven projects: Enforce token expiration for audits (e.g., "Revoked all tokens older than 90 days").
    • Multi-region deployments: Use expiration presets to align with regional data retention policies.
    • CI/CD pipelines: Generate short-lived tokens for automated testing (e.g., 7-day expiration for staging APIs).

When to Consider This Package

Adopt when:

  • Your project uses Filament 5 + Laravel 13 (or 12) and requires Sanctum token management.
  • You need token expiration controls (presets or custom dates) for security/compliance.
  • Your team lacks bandwidth to build Filament 5-compatible Sanctum UI from scratch.
  • You require role-based access to the Sanctum panel (e.g., only "API Admins" can manage tokens).
  • You’re migrating from Filament 4 and want to avoid rewriting Sanctum integration.
  • You prioritize minimal configuration (e.g., default_expiration_days in config/filament-sanctum.php).

Look elsewhere if:

  • You’re using Laravel Passport/OAuth2 (this package is Sanctum-specific).
  • You need advanced OAuth2 features (e.g., scopes, client credentials).
  • Your auth workflows require multi-factor token validation or custom token attributes.
  • You’re on Filament 3/4 without plans to upgrade (v1.1.0 drops Filament 4 support).
  • You require enterprise-grade support: The package has 53 stars and no dependents; evaluate risk for mission-critical systems.
  • You need highly custom token UIs (e.g., bulk actions, custom fields) beyond the provided modal/details view.

How to Pitch It (Stakeholders)

For Executives: *"This updated package future-proofs our Filament 5 + Laravel 13 stack while adding critical security controls. With token expiration presets and role-based access gates, we can now enforce compliance-ready API access policies—reducing risk for [SaaS/B2B/internal tool project]. For example:

  • SaaS: Automatically revoke 3rd-party tokens after 30 days, cutting support overhead.
  • Internal tools: Restrict token management to Admins only, aligning with our [security policy]. The 15–25 hour time savings (vs. custom build) lets our team focus on [core feature], with MIT licensing and active maintenance (last release: Sept 2025) mitigating risk. Let’s spike-test in staging to validate Filament 5 compatibility by [date]."*

For Engineering: *"Filament Sanctum v1.1.0 now supports Filament 5 + Laravel 13 and adds game-changing features:

  • Token expiration: Presets (7/30/60/90 days) or custom dates—configurable via default_expiration_days in config/filament-sanctum.php. Example:
    'default_expiration_days' => 30,
    'expiration_presets' => [7, 30, 60, 90],
    
  • Authorization gates: Restrict panel access via Laravel gates (e.g., gate('manage-sanctum-tokens')).
  • Per-row revoke: Click-to-revoke tokens without page reloads (Filament 5’s Action buttons).
  • Token details modal: View abilities, expiration, and timestamps—critical for audits.

Tradeoffs:

  • Filament 4 dropped: If you’re stuck on F4, use v1.0.0 or build custom.
  • Sanctum-only: No Passport/OAuth2 support.
  • Community size: 53 stars, but MIT license and recent updates reduce risk.

Action items:

  1. Spike test: Validate Filament 5 compatibility in staging (focus on token creation/revocation flows).
  2. Config review: Set default_expiration_days and authorization gate per [security doc].
  3. Document: Note that token expiration is not retroactive—existing tokens retain their original lifespan.
  4. Deprecate legacy: If using Filament 4, plan a migration to v1.1.0 for long-term support."*

For Security: *"This release strengthens token security with:

  • Expiration enforcement: Presets reduce risk of stale tokens (e.g., auto-revoke after 30 days).
  • Audit trails: Token details modal includes last used timestamps and abilities, integrable with Filament’s activity logs.
  • Access control: Authorization gates prevent unauthorized token management (e.g., only api-admins role).

Recommendations:

  • Enable expiration: Set default_expiration_days = 30 in config to align with [policy].
  • Monitor usage: Pair with Filament’s activity log plugin to track token revocations.
  • Risk: Limited to Sanctum’s model—no OAuth2 complexities, but ensure your Sanctum setup uses HTTPS and rate-limiting.
  • Compliance: Document token lifespans in your [data retention policy]."*
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.
terminal42/code-quality-tools
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