mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +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(
|
||||
(response) => response,
|
||||
(error: AxiosError) => {
|
||||
if (error.response?.status === 401) {
|
||||
if (
|
||||
error.response?.status === 401 &&
|
||||
error.config?.url !== '/sso/refresh'
|
||||
) {
|
||||
redirectToSSO();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user