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
Bug with axios.create and baseURL option? #20
Comments
Hi. Thanks for the issue. Can you please share your code for the interceptor and other things associated with it (like the actual call, other interceptors, etc.) ? |
I followed the docs exactly and don't have any other interceptors. I removed the |
Inside your The thing is, url in axios' error config is the full url and the config still has the I didn't want to change this, as this should be "just an interceptor" and I don't want people to get confused. Please, let me know if that helped. Thanks |
Hrm... that feels terrible hacky but it is a solution so I'll bear it in mind, thanks. Think it's worth an issue on the axios tracker? I'm not really sure I know enough about either library to be the one to file it though. Thanks for the responses! |
As I said earlier, I'm not sure if that's a bug or desired behavior. Either way, it feels like it shouldn't be like that, so it might be worth opening the issue and see what axios team has to say about it. If you do so, please, refer to this issue, so anyone with the same problem can see the thread. Thanks. |
Resetting the IMHO there should be a global |
First let me just say thanks for creating a great little library.
I think I've found a bug.
I set my JWT TTL to 60 seconds but the refresh TTL longer so that I can debug this JWT stuff and get it working.
So, I log into my application and then wait > 60 seconds, then I hit an authenticated route
/api/auth/me
and get a 401.The interceptor kicks in and hits the refresh token route (
/api/auth/refresh
), which returns a new token and all that jazz.After that, I see the original route that triggered the 401 getting hit again... except for one slight problem - It's hitting
/api/api/auth/me
. Theapi
part is now doubled.The text was updated successfully, but these errors were encountered: