<Why Do Our React Query Refetches Cause 401 Respon...
# community-feeds
r
Why Do Our React Query Refetches Cause 401 Responses? we have an app that uses keycloak to issue and validate JWTs. we also use react-query and we have set refetchOnWindowFocus to true. when react-query refetches the data after some time of inactivity, without the user interacting with the window, we get 401 responses from our server. as soon as we interact with the page, the same request returns a successful 200 response. the network tab looks like this:

https://i.stack.imgur.com/sBDcG.png

as soon as i...