We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92da75f commit fa3abbcCopy full SHA for fa3abbc
template/client/store/modules/auth/actions.js
@@ -90,7 +90,11 @@ export function signOut({commit}) {
90
export function loadAccount({commit}, userId) {
91
return loopback
92
.get(`/Accounts/${userId}`)
93
- .then(acc => commit('setAccount', acc));
+ .then(acc => commit('setAccount', acc))
94
+ .catch(() => {
95
+ loopback.removeToken();
96
+ router.push({ name: 'login' });
97
+ });
98
}
99
100
/**
0 commit comments