mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 23:35:45 +00:00
fix: do not redirect to SSO when the error response status is 401 and API url is refresh API
This commit is contained in:
@@ -10,7 +10,10 @@ const axiosClient = axios.create({ baseURL: BASE_URL, timeout: 10_000 });
|
|||||||
axiosClient.interceptors.response.use(
|
axiosClient.interceptors.response.use(
|
||||||
(response) => response,
|
(response) => response,
|
||||||
(error: AxiosError) => {
|
(error: AxiosError) => {
|
||||||
if (error.response?.status === 401) {
|
if (
|
||||||
|
error.response?.status === 401 &&
|
||||||
|
error.config?.url !== '/sso/refresh'
|
||||||
|
) {
|
||||||
redirectToSSO();
|
redirectToSSO();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user