U
U
unfapable2016-09-21 09:49:14
API
unfapable, 2016-09-21 09:49:14

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

2 answer(s)
A
Alex Wells, 2016-09-28
@Alex_Wells

Give code examples, nothing is clear.

B
BRAINKIT, 2018-08-21
@BRAINKIT

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 question

Ask a Question

731 491 924 answers to any question