<@498057949541826571> We faced an rare scenario o...
# support-questions-legacy
m
@rp_st We faced an rare scenario on supertoken-react-native , where refresh is being called continously on api gateway and this causes our UI thread to be blocked and app stops repsonding on an Android Device.
n
Hi @malikkhoja
r
Hey @malikkhoja
m
Hi
n
Can you post the response headers for the refresh API?
Also does the refresh API return status 200?
m
Yes its returning 200
I wills share the response headers
Its getting called every second
We are using version 3.2.0
n
What version of the backend SDK are you using?
Also which backend SDK
m
Sure give me some time i ll share
access-control-allow-credentials: true access-control-allow-origin: https://www.getzype.com access-control-expose-headers: front-token, id-refresh-token connection: keep-alive content-length: 2 content-type: application/json; charset=utf-8 date: Mon, 27 Mar 2023 07:38:16 GMT
Response header
we do get font-token, server and ser-cookie as well
response-status-code: 200
Body Response - {}
n
Yep, can you confirm what backend sdk and version you are using?
m
We are using supertoken in docker
n
I mean the backend SDK, so either supertokens-node, supertokens-golang or supertokens-python and which version
This would be on your server
The API layer
m
Ok
supertoken-node - 12.1.5
it seems the issue is related to interceptor, as if we consume a api, super token is constantly hitting the api
via interceptor
n
So before it calls the refresh API, are you calling some other API that requires sessions?
m
Yes we are calling an API, and i believe SuperToken takes care of Refresh on its own
n
Does that API return 401?
m
yes it is currently returning 401 in a given scenario
n
Can i see the config you pass to supertokens init in your app?
m
apiDomain: API_GATEWAY_URL || "", apiBasePath: "/auth", cookieDomain: API_COOKIE_DOMAIN
n
What are the values of: API_GATEWAY_URL and API_COOKIE_DOMAIN
m
Both are different https endpoint
n
Can you explain a little about your setup? If its a simple server - app relationship you shouldnt need to set different values for them
m
When we tried setting the same values for both then we were getting error hence we had set different end point
Our API gateway and Supertoken gateways is different - I can still get it verified from our backend team
n
Right so the API endpoint that you login with is different to the api endpoint that needs the session?
m
Yes
n
And the cookie domain is set to the SuperTokens endpoint or to the one that needs the session?
m
Supertoken
n
Can you also post the config the backend uses when initialising supertokens?
m
Ok
n
Also the values for the two domains would help here, otherwise its hard for me to tell whats happening