Hey, I’ll try to walk you through it using my postman examples you will need to make the format of the same request using express or Axios. the one I’ll show you uses Axios.
-
After you sign in using the /auth/local endpoint. you will receive the JSON with the JWT.
-
This JWT will be used to make requests to endpoints that are authenticated. In this example, I’ll make a get request to the /color-page endpoint and send it in the header as a bearer token.
var axios = require('axios');
var config = {
method: 'get',
url: 'http://localhost:1337/color-page',
headers: {
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MjUsImlhdCI6MTYzMjA0MTY4NiwiZXhwIjoxNjM0NjMzNjg2fQ.UVD2r7DED9OH0NbGbhFSUBr0OW3M4d7_cuq7WChK8tc'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Make sure you add the JWT in the header as shown above.
Hope this helps 
