GET request with Bearer Token in header

Hi everyone,

We are using Strapi as a backend and would like to implement persistent user login with local storage.
Generally, Strapi works with a bearer token that is passed in the headers as:
Authorization: Bearer <Your API key>
The string Bearer here is static and does not change.

Now the problem: When a user logs in for the first time, Strapi returns the token without the static part. So far I did not find a way to pass both items (concatenated with a space) to my API data resource.

Would someone mind helping me out?

Thank you,


I fixed my problem. I realized I am able to save the concatenated string with the JOIN function before reading it from local storage, see here.

1 Like