Using skipAuthRefresh with typescript #176
Unanswered
peterkronenberg
asked this question in
Q&A
Replies: 1 comment
-
Hi @peterkronenberg, we use the import type { CustomAxiosRequestConfig } from 'axios-auth-refresh/dist/utils';
createAuthRefreshInterceptor(axios, async (failedRequest) => {
const customAxiosRequestConfig: CustomAxiosRequestConfig = { skipAuthRefresh: true };
return axios
.post<ModelJWTTokens, AxiosResponse<ModelJWTTokens>, ModelRefreshTokenRequestBody>(
'/auth/refresh',
{ refresh_token: "REFRESH_TOKEN" },
customAxiosRequestConfig
)
.then(async (refreshTokenResponse: AxiosResponse<ModelJWTTokens>) => {
...
});
}); Since this interface extends the |
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.
-
Using the syntax,
axios.get('https://url', { skipAuthRefresh: true })
, the reference to skipAuthRefresh tells meThe docs mention importing
AxiosAuthRefreshRequestConfig
, but I'm not sure where to specify that. I.e., I can import it, but where do I use it?Beta Was this translation helpful? Give feedback.
All reactions