NewWe open-sourced 50+ Laravel packages
Custom AI apps, agents and automation — Roundly ConsultingRoundly
All packages
AliasPurpose
authentication.guard:{guard}Binds a package route to its guard.
authentication.verified[:guard]403 email_not_verified for unverified accounts when verification is required.
authentication.reauthenticated[:seconds[,guard]]403 reauthentication_required without a recent re-authentication (a second-factor one for accounts that have a second factor); 401 without an authenticated account.
authentication.locale[:guard]Applies the account’s locale, else the negotiated one.
authentication.active[:guard]403 account_disabled for disabled accounts.
authentication.no-storeCache-Control: no-store, private + Pragma: no-cache.

Without a guard parameter, a middleware uses the guard bound by authentication.guard, else authentication.default. Combine them on your own routes:

Route::middleware(['auth:users', 'authentication.guard:users', 'authentication.active', 'authentication.verified'])
    ->group(fn () => Route::post('/orders', PlaceOrder::class));
Route::delete('/account', DeleteAccount::class)
    ->middleware(['auth:users', 'authentication.guard:users', 'authentication.reauthenticated:300']);

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

By donating, you agree to our donation terms.

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.