-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to update the access token during 401 response #60
Comments
It was not easy but we managed to come up with a solution so that 401 errors can be captured correctly. The solution supports simultaneous calls, which are saved until the token is refreshed. What cannot be done from the library is to call back in the response interceptor the failed requests that have config, so it was solved by saving all the configs of the requests (don't worry, they are then deleted in the This is the code (just use your
Then import it and call
|
@gaspartripodiglobant Thanks mate |
I solved this by applying a patch-package to This way I always have access to the original config and original url. |
Hi guys,
I had a requirement where I want to intercept the response, when the token is expired using refresh token.
In the last release of the library, there was an update about request data passed with the response through which we can get the url. But how can I get the config details too. As there is no proper example or documentation on this, can anyone help me out here.
In the following open issue #39 , there is code provided but the implementation
wont work, in a case where there are multiple request been sent in same time.
Thanks,
:)
The text was updated successfully, but these errors were encountered: