I'm using lexik_jwt_authentication to make api calls to symfony. I made the call to login and I get the token so all good at this level. Now when I tried to make a call to another api whith this token I get the error : Call to a member function isAdmin() on null (500 Internal Server Error). My api :
/**
* @Route("/vsbridge/product/get/{product}")
* @Method("GET")
*
* @param Request $request
*
* @return JsonResponse
*/
public function getProduct(
Request $request
) {
$user = $this->getUser();
return $this->json([
'status' => 200,
'result' => $user,
]);
}
Have you an idea ? Thx in advance.