---
title: "Artisan commands — Auth for Laravel | Roundly"
description: "Install and wire, scaffold new guards, run the configuration doctor, prune old data and log an account out everywhere."
url: https://roundly-consulting.com/open-source/docs/auth-for-laravel/commands
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Auth for Laravel](https://roundly-consulting.com/open-source/docs/auth-for-laravel.md)

# Artisan commands

| Command | Purpose |
| --- | --- |
| `authentication:install {--guard=users}` | Publish config + migrations (incl. refresh-tokens, two-factor and passkeys), print the auth/jwt wiring. |
| `authentication:guard {name} {--model=} {--table=} {--no-two-factor} {--no-passkeys} {--force}` | Scaffold a guard (model, migration, factory) and print its config. |
| `authentication:check {guard?}` | The doctor: every config rule, provider wiring, columns, keys, revoker, mail and routes; exit 1 on errors. |
| `authentication:prune {--days=}` | Delete expired challenges and one-time tokens, and old invitations and activity. |
| `authentication:logout-everywhere {guard} {id}` | Incident response: revoke every session and access token of one account. |

```bash
php artisan authentication:install --guard=users
php artisan authentication:guard staff --model=StaffMember --no-passkeys
php artisan authentication:check staff
php artisan authentication:prune --days=30
php artisan authentication:logout-everywhere users 42
```

Schedule pruning:

```php
// routes/console.php
Schedule::command('authentication:prune')->daily();
```

## About

The provider adds an Authentication section to php artisan about: guards, the default guard, whether the hash key is set or derived (never the key), the access-token revoker, and for the default guard its login methods, 2FA, passkeys, registration, verification, routes, notification delivery, breach check and audience.

```bash
php artisan about --only=authentication
```

## Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

[More ways to support, including crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/auth-for-laravel.md)
