Interview practice question
Handling token refresh when many requests run at once
Frontend Engineering · Async JavaScript and the Browser · Intermediate
When an access token expires, several parallel requests fail and each tries to refresh the token, causing errors. How do you fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Single refresh in flight (shared promise).
- Queue failed requests, retry after refresh.
- Avoid refresh storms.
- Handle refresh failure (logout).
- Proactive refresh before expiry.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.