Is it okay to refresh access and refresh tokens every time the page / tab loads?

Viewed 23

I used JWT on some projects recently and I don't want to wait anymore for the access token to expire or the server to return a 401 error to refresh my tokens (both access and refresh tokens).

So I came up with a new flow where I'd now refresh my tokens every time a user loads the page or open a new tab and it works pretty well actually but what I want to know is the following:

Is it bad and unwise to use this flow?

0 Answers
Related