Am I using the correct Middleware to Authenticate?

In my config:

use App\Http\Middleware\Authenticate; // have also tried with same result // use Filament\Http\Middleware\Authenticate; 'middleware' => [ 'auth' => [ Authenticate::class, ], ... ``` My issue is that even with a user Model with ``` public function canAccessFilament(): bool { return false; } ``` Still all users can access admin pages Also .env has APP_ENV=staging I have seen answers using isFilamentAdmin()` but that is v1, right?
Was this page helpful?