You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When access expires, if the user clicks quickly on the web page and triggers two requests at the same time, in this case, the new access can be refresh normally, but when the new access is used to request resources, it returns 401
It's responsibility of a client code to prevent concurrent refresh requests.
Basically, the JS client should disable page refreshing while there's a pending refresh request, and enable it back afterwards.
@masterkain requests with the same access token can be sent concurrently, the gem does not add any limitations.
Refresh token requests are supposed to be limited, throttling may lead to vulnerabilities I think.
When access expires, if the user clicks quickly on the web page and triggers two requests at the same time, in this case, the new access can be refresh normally, but when the new access is used to request resources, it returns 401
I wrote a demo project to solve this problem:https://github.com/activeliang/try_jwt_session
To simulate the above situation, I wrote the following code:
Is it because I did something wrong?
The text was updated successfully, but these errors were encountered: