JWT Multiple Request Refresh Token(medium.com)
medium.com
JWT Multiple Request Refresh Token
https://medium.com/@alexeykhr/jwt-multiple-request-refresh-token-693bb24e3a68
2 comments
Seems like a lot of work where a simple session id would suffice. JWT’s are not the appropriate solution where session-like behavior is wanted.
This problem will also exist if an opaque token is used instead of a JWT (as long as a refresh token is being used). Now you may argue that we don't need to use refresh tokens because that's complex, however, in that case, you are severely compromising on user security. See this please: https://supertokens.io/blog/all-you-need-to-know-about-user-...
This is exactly what SuperTokens.io does in their website SDK. As a user, you don't need to worry about this and can simply make your fetch / axios calls as usual.