Answer the question
In order to leave comments, you need to log in
How does CORS and JWT work in Laravel?
There was already a similar one here, but no detailed answer was given. And my question is a bit off topic.
What interests me is this: when a user logs in, he is given a token, and where is it then stored? I mean, when I re-enter the site, I no longer require authorization, but there is nothing in the cookies. And why is an OPTIONS request sent every time? As I understand it, it is needed to get a token, but where does it get it from, where is the token stored?
I'm making an API and want to enable external resources (from other domains) to access it. But I ran into the question, how, after authorization, to get a token? The Authorization header appears only after a request of the OPTIONS type, it is not clear how and where the token is stored, how it is determined, because it always remains the same, is it stored somewhere in the cache?
I would be very grateful if someone could help me. I read the documentation, but as I already wrote, it is not clear in the end how to get the token of an already authorized user.
Answer the question
In order to leave comments, you need to log in
What interests me is this: when a user logs in, he is given a token, and where is it then stored?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question