Token refresh concurrency
Five API calls go out at once when a screen appears, the access token has expired, and all five get a 401. Right now each request calls refresh on its own, so the server invalidates the refresh token and the user gets logged out. How would you fix it?