Seems it problem of Laravel 11. I test it on 10, it works
Apr 20, 2024
3
Level 1
Argument #2 ($guard) must be of type Illuminate\\Contracts\\Auth\\StatefulGuard, Laravel\\Passport\\Guards\\TokenGuard given
I receive Laravel\\Passport\\Http\\Controllers\\AuthorizationController::__construct(): Argument #2 ($guard) must be of type Illuminate\\Contracts\\Auth\\StatefulGuard, Laravel\\Passport\\Guards\\TokenGuard given error when trying access (GET) /authorize route.
config/auth.php:
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'passport',
'provider' => 'users',
],
],
config/passport.php:
'guard' => 'api',
Please or to participate in this conversation.