M-Dash
M-Dash copied to clipboard
Bearer token key naming inconsistent for local storage
The current login/logout actions in the Vuex store, that call the Axios REST API, use browser Local Storage to set/remove a Bearer Token. using the secure-ls package.
The key-name on set() and remove() for the token value is inconsistent, for example on login the name is tokenKey, but on logout the name is token. The result is that the token remains in Local Storage and the Dashboard can be accessed after logout.
There are several places in actions.js where ls.remove('token') is used. Change all these occurrences to ls.remove('tokenKey').