Chris Nwamba wrote a nice tutorial on how to handle Authentication In Vue Using Vuex

vue authentication

Traditionally, many people use local storage to manage tokens generated through client-side authentication. A big concern is always a better way to manage authorization tokens to allow us to store even more information on users.

This is where Vuex comes in. Vuex manages states for Vue.js applications. It serves as a centralized store for all the components in an application, with rules ensuring that the state can only be mutated in a predictable fashion.

Tutorial link

https://scotch.io/tutorials/handling-authentication-in-vue-using-vuex