Handle concurrent requests while refreshing token in SvelteKIT
I am trying to implement token update logic for my SvelteKIT application which uses an external api. I ran into a problem with handling concurrent requests. I added a semaphore to prevent multiple token refreshes, but now I have a different problem. I am waiting for the update to complete, but the event passed to the handle function does not contain new cookies. How can I solve this problem?