Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.x] Support prompting login when redirecting for authorization #1577

Merged
merged 5 commits into from
Oct 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bind StatefulGuard
  • Loading branch information
hafezdivandari committed Sep 20, 2022
commit e67fda0810b5a71f6359846d514864469253c63c
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