Laravel Passport is an OAuth2 server and API authentication package that is simple and enjoyable to use.
composer require liliom/passport 3.0.x-dev
By default, Passport will use the default connection name, but now you can use custom database connection for Passport by adding your connection name in config/auth.php
(guards.api.connection)
....
'guards' => [
...
'api' => [
'driver' => 'passport',
'provider' => 'users',
'connection' => env('PASSPORT_CONNECTION'),
],
],
...
Documentation for Passport can be found on the Laravel website.
Laravel Passport is open-sourced software licensed under the MIT license.