-
Notifications
You must be signed in to change notification settings - Fork 782
Closed
Description
- Passport Version: v11.3.1
- Laravel Version: v9.43.0
- PHP Version: 8.1.11
- Database Driver & Version: MySQL 5.7.39
Description:
I'm working on a project with multiple guard. The regular web guard and the admin guard.
In the AuthorizationController on line 97 it requests the user, without any guard as parameter. Because of this it tries to get the web user and not the admin user. I'm not sure if I did forget something while setting up multiple guards or this is a bug.
When I change $user = $request->user();
to $user = $request->user(config('passport.guard'));
it works fine.
Steps To Reproduce:
- I've added a new guard, new provider and
Admin
model. - I installed Laravel passport
- Changed the provider in the
oauth_clients
table to the name of my new provider (calledadmins
). - Published the config and changed the guard to
admin
Metadata
Metadata
Assignees
Labels
No labels