keycloak-configurable-token-api icon indicating copy to clipboard operation
keycloak-configurable-token-api copied to clipboard

Long Live token not working Keycloak 11

Open abdulfousan opened this issue 2 years ago • 3 comments

I've tried the following docker command to run,

docker run -p 8080:8080/tcp -p 8443:8443/tcp -e KEYCLOAK_LONG_LIVED_ROLE_NAME=long_lived_token -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin kc-longlive:latest

POST http://localhost:8080/auth/realms/platform-realm/configurable-token { "tokenLifespanInSeconds": 63113904 }

where kc-longlive:latest is my local docker image created based on readme, still returns the same access token expiry. Please help us to solve

FYI im using a client which is using password grant type / public client, access token lifespan set to 1 day.

abdulfousan avatar Jul 17 '22 14:07 abdulfousan

Hi @abdulfousan,

Could you provide a repository containing your Dockerfile and your realm configuration ?

looorent avatar Jul 17 '22 15:07 looorent

i'll share it shortly, Do we need to enable this preview option in keycloak?

-Dkeycloak.profile=preview` -Dkeycloak.profile.feature.token_exchange=enabled

abdulfousan avatar Jul 17 '22 16:07 abdulfousan

token_exchange is not required for this library. If you use Keycloak from quay.io, I have updated the README accordingly (the target path is different).

looorent avatar Jul 27 '22 14:07 looorent