Hey, got a question regarding axios interceptors. ...
# support-questions-legacy
l
Hey, got a question regarding axios interceptors. Since we no longer need to explicitly set interceptors, how can I choose which axios instance the supertokens chould use? (is that possible) (using vue3 and go)
r
hey @leandergan
@porcellus can help here
p
Hi
l
Hi there
p
In the latest version, it's added to everything by default: we are replacing the XMLHttpRequest class axios uses to make requests
r
But you can override the xmlhttprequest recipe function on the frontend to do nothing and just use the older addAxiosInterceptor manually right?
p
If you wish, you could disable this by overriding the
addXMLHttpRequestInterceptor
function
exactly, I was just looking for the function name 🙂
l
ah, ok. sound good. 👍
But I would have to use the "old" method if I want to add interceptros when using e.g. the
session.getAccessTokenPayloadSecurely()
?
p
getAccessTokenPayloadSecurely
has no connection to the XHR override
hmm
I mean not directly: it wont use the XHR override to call refresh if it needs to.
You have to use one of our overrides in order for the access token payload to update after your API calls (and for a bunch of other things ofc.)
l
Got it, thanks.
18 Views