i have react redux application my issue when the token expired , i facing issue how to refresh the token and recall the api, this code i call when i get any API in my app
First action I invoke it's getWithAuth() and in this way I'm handling refresh token i know I'm doing wrong.
(The code is not working actually just I'm showing example) https://stackblitz.com/edit/react-kdujea?file=apiManager.js
I want when I call getWithAuth or any api and I get result 401. I want refresh token and if I result 401 then logout.