Replies: 1 comment
-
Maybe I use this library in the wrong way. Maybe I should use simple axios interceptor to catch the 401 errors and redirect users to the login page. This way I don't need this feature anymore, because I will have only one interceptor. I wonder if such a feature will ever be needed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
I have two auth refresh interceptors
One for refreshing expired csrf-token
Second for redirecting user to the login page when session expires
When user provides wrong login credentials my server responds with 401 error.
In this situation I want to skip the interceptor for the 401 error, but I don't want to redirect user to the page he is already on.
And I also want to keep interceptor for 419 error, because user could have expired csrf token that needs to be refreshed.
Currently I can only skip or all interceptors or none
It would be beneficial if I could skip the interceptor for specific code
Beta Was this translation helpful? Give feedback.
All reactions