Open cristiano-pacheco opened 7 years ago
I'm working on it. I sent a PR with first adjusts #40 This a delicate situation, because have a lot details for consideration, the principal is requests concurrence
I will implement a preventive approach, not reactive Mais detalhes em breve
When api returns a response with status 401 and with data.reason = 'token_expired'
1- Try to update the user's token, sending a request to /auth/refresh
If successful: Update the user's token (Local Storer, Vuex, Header) and resend the previous request.
If you do not succeed: Delete the token and user data in Vuex and Local Storage and redirect to the login page.