Is it possible to configure keycloak to extend refresh token expiration time every time when refresh token is used to refresh user session? For example:
I have a vaild refresh token.
I use this token to refresh my session (grant_type = refresh_token)
I get a new access token and a new refresh token. New refresh token has expiration set to (now +30 days).
Right now when keycloak issues a new refresh token it has the same expiration time as the old refresh_token.
It sounds like you may be looking for a use case for “offline access” in Keycloak. I would recommend checking out the Keycloak documentation on the topic for more information:
Please note that offline tokens are similar to refresh tokens, but they can be used to obtain a new access token even when the user is not actively using the application. Keep in mind that offline tokens are essentially a password, so it is important to treat them with the same level of security and care as you would with any other sensitive information.