I have a token (generated with Laravel passport) in my header while sending a request. When I want to extract data from the token, I have the following:
$request->user();
But this retrieves the data from the db (because when I change the name value, it givespppps me the new name), which is not a good idea. (since the goal of jwt is extract the data form the token itself and be stateless).
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community