I am interested in the theory about properly securing and integrating Vue CLI app with any generic backend framework using JWT.
Let's get straight to the questions:
- Is there something like a response
Authorizationheader which the backend can use to set the token automatically in Axios? (I only found a guide to set it manually from the response body) - Does the browser create a new instance of an app if I refresh and/or reopen a tab? Does this mean that the whole app including custom Axios instance with
Authorizationheader is destroyed and the new one needs to set it once again (from local storage)? - Is Axios with (manually) set
Authorizationheader CSRF safe? The point here is that the header isn't browser provided, but rather app provided (only visible to custom Axios instance in the application), right? So an attacker simply cannot get to the token, right? And so while he can still make a call, it won't get authorized, right?