We would want to avoid re-login in the user every hour. Is it ok to continually refresh the token on the server before it expires?
Do you have plans to increase the token expiration time to avoid less calls to the API?
We would want to avoid re-login in the user every hour. Is it ok to continually refresh the token on the server before it expires?
Do you have plans to increase the token expiration time to avoid less calls to the API?
Yes absolutely, the refresh token serves as a way to revoke an access token. The more you refresh, the more you will revoke the potential of an access token being leaked and misused.
A short expiration time mitigates the risk of a long-lived access token leaking.
I have tried it in my Django project, and after an hour, not only the access token expired but also the refresh token. Within one hour, I am using the refresh token to get a new access token and refresh token, but after one hour, I can't use them both.
So, I guess, we need to refresh it before it expires, in our cases, maybe every 50 minutes or something.