Answer the question
In order to leave comments, you need to log in
What is wrong with laravel passport?
Situation:
There is a way
Route::get('test', '[email protected]'); // api/test
Route::get('test', '[email protected]')->middleware(['auth:api']);
return $this->setData([
'user' => Auth::user(), // null
'token' => $request->bearerToken() // а тут выводит токен
]);
Answer the question
In order to leave comments, you need to log in
In config/auth.php like this?
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question