A
A
Andrey Okhotnikov2019-07-10 10:41:50
JSON Web Token
Andrey Okhotnikov, 2019-07-10 10:41:50

Adding authorization token to headers?

How to correctly implement the transfer of an authorization token in the REST API?
1) Add a token only to those requests that require authorization
2) Add a token to all requests

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-07-10
@tsepen

Using axios as an example:
If you need to add only to authorized ones, then you can write a wrapper, or create a separate instance.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question