From 79bce18c6036f11cae57c8120d89fda57c1dd64b Mon Sep 17 00:00:00 2001 From: Dimas Atmodjo Date: Tue, 19 Nov 2024 11:11:02 +0700 Subject: [PATCH] -u refresh token handler --- src/utils/axiosInstance.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/axiosInstance.jsx b/src/utils/axiosInstance.jsx index ecb3faf..9141315 100644 --- a/src/utils/axiosInstance.jsx +++ b/src/utils/axiosInstance.jsx @@ -45,6 +45,7 @@ axiosInstance.interceptors.response.use( originalRequest.headers.Authorization = newAccessToken; return axiosInstance(originalRequest); } catch (err) { + window.location.href = '/login'; return Promise.reject(err); } }else if (error.response.status === undefined) {