Search code examples
oauth-2.0access-tokenopenid-connectkeycloakrefresh-token

How to specify refresh tokens lifespan in Keycloak


Keycloak refresh token lifetime is 1800 seconds:

"refresh_expires_in": 1800

How to specify different expiration time? In Keycloak admin UI, only access token lifespan can be specified:

enter image description here


Solution

  • The refresh token lifetime is controlled by the SSO Session Idle Setting. 30 minutes = 30 * 60 = 1800 seconds (the refresh_expires_in value)