Skip to content

Commit

Permalink
bind StatefulGuard
Browse files Browse the repository at this point in the history
  • Loading branch information
hafezdivandari committed Sep 20, 2022
1 parent ab334bb commit e67fda0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/PassportServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use DateInterval;
use Illuminate\Auth\Events\Logout;
use Illuminate\Config\Repository as Config;
use Illuminate\Contracts\Auth\StatefulGuard;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\Event;
Expand Down Expand Up @@ -134,6 +135,10 @@ public function register()

Passport::setClientUuids($this->app->make(Config::class)->get('passport.client_uuids', false));

$this->app->bind(StatefulGuard::class, function () {
return Auth::guard();
});

$this->registerAuthorizationServer();
$this->registerClientRepository();
$this->registerJWTParser();
Expand Down

0 comments on commit e67fda0

Please sign in to comment.