Answer the question
In order to leave comments, you need to log in
How to properly process JWT in middleware and pass further information from the token to the controllers?
Laravel 5.3.
I wrote a middleware to check the token for presence and validity, but I don’t understand how to forward the information from the token further. And is this the correct approach? Tell me please.
Answer the question
In order to leave comments, you need to log in
Log in to Middleware, get a token, write it to the session or $request (if you need constantly fresh data) and then use it anywhere.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question