Bishop19
Bishop19

Reputation: 47

Keycloak - Extend refresh_token expire time after requesting a new access token

I'm trying to extend the expiration time of refresh tokens, after using one.

Let's imagine that my current access_token has expired. In order to have a new access_token, I make a request using my refresh token, grant_type='refresh_token'&refresh_token=refreshToken, to Keycloak that gives me a new access_token and a new refresh_token. The problem is that this new refresh_token has the same expiration date as the previous one. This means that I'll have to reenter my credentials some time after my login in order to extend my refresh token expire date.

What I intend to do is to only logout from my application if the user doesn't login for a given amount of time.

Note: If I change the scope to be offline_access there is no expiration date on the token. I could use this but this means that this token will live forever. See also:

Thank you all in advance.

Upvotes: 0

Views: 2218

Answers (0)

Related Questions