migrate. If you only need access tokens with no device tracking or refresh rotation — the common pattern for M2M APIs and short-lived session flows — you can skip the migration entirely.
Access-only mode (no devices, no refresh): If you don’t need refresh-token rotation or device tracking, publish only the config and skip the migration. Don’t implement
HasDevices on your identity model. Auth::device() will always return null, but the full Auth::identity(), Auth::principal(), Auth::tenant(), and Auth::type() surface still works. You can add device support later — it’s additive, not a rewrite.Requirements
- PHP ^8.3 (extensions:
hash,mbstring,openssl) - Laravel ^12.40 || ^13.3
Steps
Publish the config file
Publish This creates
config/authentication.php to your application:config/authentication.php with defaults for JWT signing, device tracking, credential timing, and optional resolution caching.Publish the device migration
Publish the
devices table migration. Skip this step if you are using access-only mode.Run migrations
Apply the published migration to your database. Skip this step if you are using access-only mode.This creates the
devices table, which the package uses for refresh-token rotation, replay detection, and debounced last_logged_in_at writes.Next steps
With the package installed and the secret set, register your first guard inconfig/auth.php: