Description
For some applications (which make use of JWTs), we are using fetch and custom Vue instance methods to handle fetch requests and re-authentication in the background, so in case the access token has expired, the application will automatically retry fetching a new access token with the refresh token, if for a request it gets a 401. If that request was successful, it will retry fetching the resource one more time.
There is actually already an awesome cookbook about custom instance properties (https://vuejs.org/v2/cookbook/adding-instance-properties.html), but this one would specifically talk about a $http handler which also takes care of authentication in the background automatically.
Would this be something of interes? If so, I'd love to write something up and create a PR for it.