You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, I'd like to say thanks for creating this project! It's saved me a lot of time and is (almost) perfect for my needs.
In my particular scenario, I'd like to use this interceptor to handle some 401s but not all of them. The ignoreAuthModule config flag works great for scenarios where you know ahead of time that a particular call will produce a 401 that should be ignored.
For our application, a 401 can be returned for different scenarios and we may not know how the 401 should be handled until the response is received. It would be great if the interceptor had the ability to examine the response based on some custom criteria to determine whether or not it should let it pass through or capture it. The code below illustrates this idea (From line 56 in http-auth-interceptor.js)
Hello!
First, I'd like to say thanks for creating this project! It's saved me a lot of time and is (almost) perfect for my needs.
In my particular scenario, I'd like to use this interceptor to handle some 401s but not all of them. The
ignoreAuthModule
config flag works great for scenarios where you know ahead of time that a particular call will produce a 401 that should be ignored.For our application, a 401 can be returned for different scenarios and we may not know how the 401 should be handled until the response is received. It would be great if the interceptor had the ability to examine the response based on some custom criteria to determine whether or not it should let it pass through or capture it. The code below illustrates this idea (From line 56 in http-auth-interceptor.js)
Original
Proposal
Using the above logic, the 401 is allowed to propagate to other interceptors and is not captured if it doesn't match the custom criteria.
The text was updated successfully, but these errors were encountered: