Token & Data Retieval When Logging in

Hi there,

I am new to not just vue but developing in general so please bear with. I am trying to solve a problem where I am trying to display some info retrieved from a store file once a user has logged in. But it seems that it is requesting the data before the token has done it’s thing, resulting in a 401 (unortharized) error in console and no data.

It brings the data in no trouble if you then refresh the page.

I have tried bringing in the data via ‘created’ and ‘mounted’ but with the same results.

Landing page:
mounted() {
this.$store.dispatch(‘getFilePath’)
.then(resp => {code to execute}
}

The token is called at the top of AxiosServices.js file

Help gratefully received!

Thanks