Skip to content

Commit

Permalink
removed logout if 401
Browse files Browse the repository at this point in the history
  • Loading branch information
salimkanoun committed Jul 9, 2023
1 parent 159a5fc commit 97f5609
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FrontEnd/src/services/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ axios.interceptors.response.use(
const urlString = error?.response?.config?.url
if (status === 401 && urlString && !urlString.startsWith('/api/authentication')) {
// Singleton toast using fixed id to avoid multiple toast if multiple api call are 401
errorMessage('Session expired. Please reauthenticate.')
store.dispatch(logout())
errorMessage('Unauthorized answer, session is probably expired, please reidentify')
//store.dispatch(logout())
}
return Promise.reject(error.response ?? error)
}
Expand Down

0 comments on commit 97f5609

Please sign in to comment.