Closed S1MB10T3 closed 5 years ago
Found a solution. If the user refreshes the page the will header loses the authorization token after login. Need to remake load() action to work with my api. For now I'm letting token in apiClient.js
initialize with the jwt token cookie.
Also changed the header to add to work with Django restframework by adding
if (token) {
conf.headers.authorization = `Bearer ${token}`;
}
How should I send over the token that's saved in my cookies over to axios. Tried changing
apiClient.js
token totoken = cookie.get('jwt')
. Still doesn't get sent over along with a post request and getting a 403 error"Authentication credentials were not provided."
in response.