2 ms·
How do refresh tokens work in the presence of concurrent requests from multiple tabs? I don't see how two tabs could synchronize their access in a way that won'
by benmmurphy 6y ago
How do refresh tokens work in the presence of concurrent requests from multiple tabs? I don't see how two tabs could synchronize their access in a way that won't lead to the possibility of one tab thinking it has been logged out. I guess you can try and paper of these issues with JS but without client side JS you are completely lost.
- rishabhpoddar 6y agoYea! That's why we have a frontend SDK that solves for issues like these. Our SDK uses a library called browser-tabs-lock which provides locking across tabs (https://www.npmjs.com/package/browser-tabs-lock https://www.npmjs.com/package/browser-tabs-lock). So essentially, whenever a refresh call is made, we synchronise those requests. This library is written by us to solve for the exact problem you mentioned! It's also being used by Auth0