singleloginsystem/app/Providers/PassportServiceProvider.php
= fb7b1e3721 Feat: Configure Laravel Passport for API authentication
- Added `PassportServiceProvider` to configure token expiration intervals.
- Updated `User` model with `HasApiTokens` trait and `OAuthenticatable` interface for Passport support.
- Registered `PassportServiceProvider` in `bootstrap/providers.php`.
2026-06-18 10:33:58 +00:00

22 lines
506 B
PHP

<?php
declare(strict_types=1);
namespace App\Providers;
use Carbon\CarbonInterval;
use Illuminate\Support\ServiceProvider;
use Laravel\Passport\Passport;
class PassportServiceProvider extends ServiceProvider
{
public function register(): void {}
public function boot(): void
{
Passport::tokensExpireIn(CarbonInterval::minute(30));
Passport::refreshTokensExpireIn(CarbonInterval::days(15));
Passport::personalAccessTokensExpireIn(CarbonInterval::months(6));
}
}