I want to make a redirection in axios interceptors when receiving a 403 error. But how can I access the history outside React components ?
In Navigating Programatically
This works perfectly.
window.location.href = `${process.env.REACT_APP_BASE_HREF}/login`;