Change login handling to automatically redirect a user if their session will need renewal.
This commit is contained in:
parent
24bb8da43d
commit
e7faf979a1
8 changed files with 126 additions and 23 deletions
|
@ -4,7 +4,19 @@ import auth from './modules/auth';
|
|||
|
||||
Vue.use(Vuex);
|
||||
|
||||
export default new Vuex.Store({
|
||||
const store = new Vuex.Store({
|
||||
strict: process.env.NODE_ENV !== 'production',
|
||||
modules: { auth },
|
||||
});
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept(['./modules/auth'], () => {
|
||||
const newAuthModule = require('./modules/auth').default;
|
||||
|
||||
store.hotUpdate({
|
||||
modules: { newAuthModule },
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export default store;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue