Closed
Description
- Passport Version: 11.3
- Laravel Version: 9.19
- PHP Version: 8.1.11
- Database Driver & Version: mysql:8.0.1
Description:
I can see that passport class had some changes -
#1464
before , in my AuthServiceProvider class , I used to add this code -
Passport::routes();
and now I dont add any more with those changes .
I dont know If I have to add in other place, the passport routes .
well . but my question is , I have a personal token that I get like this -
first I create the access token -
php artisan passport:client --personal
then I log in -
$user = User::find(1);
return $user->createToken('the_persona_ access_client_name')->accessToken;
so it returns a access token .
with this token I make a request to get the user information , like this -
request to - myap.com/api/user-info
header - Bearer my_token_goes_here
in the user info Controller -
public function user_info(Request $request)
{
return ['user' => auth()->user()];
}
it is returning null -
{
"user": null
}
It is not returning any more my user .
Steps To Reproduce:
Metadata
Metadata
Assignees
Labels
No labels