Saturday, April 1, 2017

How do I resume/resend a request after getting a new refresh token using Anugular JS with JWT Auth/ Laravel?

Here's the case: On a successful login the client will get a token and I'm sending it with every request in the http header The user uses my app for sometime and bit later when making a add to basket action the jwt token gets expired and I will be throwing an error like 40* something and will be issuing a new request to get the token.

My problem is that How do I resume the last failed request after getting the new token? I can write this manually on every error response part, but it takes a lot of code.



via user3407278

Advertisement