fixing
This commit is contained in:
parent
6a2ce4320c
commit
b55b88b72e
3 changed files with 3 additions and 3 deletions
|
|
@ -33,7 +33,7 @@ http.interceptors.response.use(
|
||||||
// eslint-disable-next-line no-prototype-builtins
|
// eslint-disable-next-line no-prototype-builtins
|
||||||
if (error.hasOwnProperty("response")) {
|
if (error.hasOwnProperty("response")) {
|
||||||
if (error.response.status === 401 || error.response.status === 403) {
|
if (error.response.status === 401 || error.response.status === 403) {
|
||||||
// kcLogout();
|
kcLogout();
|
||||||
// Store.commit("SET_ERROR_MESSAGE", error.response.data.message);
|
// Store.commit("SET_ERROR_MESSAGE", error.response.data.message);
|
||||||
// Store.commit("REMOVE_ACCESS_TOKEN")
|
// Store.commit("REMOVE_ACCESS_TOKEN")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ async function kcLogout() {
|
||||||
if (keycloak.authenticated !== undefined) {
|
if (keycloak.authenticated !== undefined) {
|
||||||
keycloak.logout();
|
keycloak.logout();
|
||||||
}
|
}
|
||||||
// window.location.href = "/login";
|
window.location.href = "/login";
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getToken() {
|
async function getToken() {
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ const router = createRouter({
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
if (to.meta.Auth) {
|
if (to.meta.Auth) {
|
||||||
if (keycloak.authenticated === undefined) {
|
if (keycloak.authenticated === undefined) {
|
||||||
// kcLogout();
|
kcLogout();
|
||||||
} else {
|
} else {
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue