fixing check token auth

This commit is contained in:
Warunee Tamkoo 2024-08-16 14:11:55 +07:00
parent e1acb72512
commit f4db48d0bf
2 changed files with 21 additions and 5 deletions

View file

@ -1,5 +1,5 @@
import Axios, { type AxiosRequestConfig, type AxiosResponse } from "axios";
import keycloak, { kcLogout } from "./keycloak";
import keycloak from "./keycloak";
const http = Axios.create({
timeout: 1000000000, // เพิ่มค่า timeout
@ -33,7 +33,7 @@ http.interceptors.response.use(
// eslint-disable-next-line no-prototype-builtins
if (error.hasOwnProperty("response")) {
if (error.response.status === 401 || error.response.status === 403) {
kcLogout();
// kcLogout();
// Store.commit("SET_ERROR_MESSAGE", error.response.data.message);
// Store.commit("REMOVE_ACCESS_TOKEN")
}