Hey , there is a case where somehow 2 access tokens are present in the cookies. One expired and another correct . But the fe uses the the expired one to make api calls which result in 401 and then the sdk calls refresh token api which results in 200 but the previous token still persists and all the subsequent calls still result in 401 and it results in infinite api calls from fe .
How can I prevent fe to make calls to refresh token api after some retries and then redirect to login page ?