L
L
lexstile2021-04-01 14:08:30
JavaScript
lexstile, 2021-04-01 14:08:30

Do I need to include Bearer in the Authorization header?

How to correctly pass and process the Authorization header in js + php?
Found this excerpt :

const http = axios.create({
  headers: {
    Authorization: `Bearer ${window.location.search.slice(1)}`,
  }
});

Why is the word Bearer here, so that later we can get rid of it on the back, if authorization is always one way?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question