diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 9e68caa6f..dbbbece8e 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -3,6 +3,7 @@ namespace App\Providers; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; +use Laravel\Passport\Passport; class AuthServiceProvider extends ServiceProvider { @@ -24,6 +25,10 @@ class AuthServiceProvider extends ServiceProvider { $this->registerPolicies(); - // + Passport::routes(); + + Passport::tokensExpireIn(now()->addDays(15)); + + Passport::refreshTokensExpireIn(now()->addDays(30)); } } diff --git a/config/auth.php b/config/auth.php index a9264b4a2..3b50d4c1a 100644 --- a/config/auth.php +++ b/config/auth.php @@ -42,7 +42,7 @@ return [ ], 'api' => [ - 'driver' => 'token', + 'driver' => 'passport', 'provider' => 'users', ], ],