Answer the question
In order to leave comments, you need to log in
How to solve the problem with token_not_provided?
There is an application on Laravel, JWT authorization is connected there. From another domain, I need to get users from the application, but when I try to do this, an error occurs - token_not_provided. As I understand it, you need to transfer a token with a request, and for this I need to display the token in the application? And if I'm already authorized in the application, why doesn't it automatically pick up the token when I make a request from another domain?
Answer the question
In order to leave comments, you need to log in
I met a similar problem, for a solution:
On the server side, I wrote the rules in .htaccess:
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
And when sending a token by a client application, a header with a token like this:
headers.Authorization = `Bearer ${token}`
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question