Closed michaelnabil230 closed 1 year ago
Can be seen in the unit test with the link: https://github.com/michaelnabil230/laravel-passport-issue/blob/master/tests/Feature/HomeTest.php
Can also see the result of the unit test with the link: https://github.com/michaelnabil230/laravel-passport-issue/actions/runs/3660881096
Multi auth isn't meant to be used with personal access tokens. It's meant to be used with the OAuth grants like the passport grant. Also, you're using the passport:install
command at the beginning of your tests but that won't install the password grant for the admins provider. Please see the docs about that here: https://laravel.com/docs/9.x/passport#customizing-the-user-provider
Description:
I have a problem when I create multiple authentications.
When I visit one of the links that have the user's authority and I make sure if this user is an admin or user using
auth()->check()
gives the result that the admin is true, although the token used in the request is a user's token, not an adminI followed the instructions in the package's docs but to no avail.
I was done creating a unit test to try this point only.
Steps To Reproduce:
https://github.com/michaelnabil230/laravel-passport-issue