Pavel Olnyov
Posted on February 7, 2020
I want to create API with OAuth 2.0 authentication.
Use Laravel Passport tutorial https://laravel.com/docs/6.x/passport.
Set up the configuration on config/auth.php:
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'passport',
'provider' => 'users',
],
],
When testing, I use a fresh token, but in response I get an error:
SQLSTATE[42703]: Undefined column: 7 ERROR: column "api_token" does not exist↵LINE 1: select * from "users" where "api_token" = $1 limit 1
Solution: clear the cache with command:
php artisan config:clear
💖 💪 🙅 🚩
Pavel Olnyov
Posted on February 7, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.