Closed manoj-infrasssist closed 7 years ago
You haven't specified user model (class) in your config files, Laravel Passport throws this error:
if (is_null($model = config('auth.providers.'.$provider.'.model'))) {
throw new RuntimeException('Unable to determine authentication model from configuration.');
}
Just make sure your providers.{provider}.model is set in config/auth.php
Thanks for the reply. But I have included the model in config/auth.php. Below is the code in config/oauth.php
return [
'defaults' => [
'guard' => 'api',
'passwords' => 'users',
],
'guards' => [
'api' => [
'driver' => 'passport',
'provider' => 'users',
],
],
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => \App\User::class
]
]
];
Hi Dusterio, I found out the issue. I had not included the <?php tag in config/auth.php. After including <?php tag that error gone but another error displayed
Trait 'App\HasApiTokens' not found
while requesting the access token for password grant type I got the error URL : http://localhost:8000/oauth/token Error : Unable to determine authentication model from configuration.