pipedream icon indicating copy to clipboard operation
pipedream copied to clipboard

[BUG] Keycloak - Token inactivated after one operation

Open vunguyenhung opened this issue 2 years ago • 1 comments

Describe the bug Keycloak, after I connected to keycloak account, I can execute an action for example the delete user as below image

Though after that, I couldn't fetch data anymore image

On the source log, I see the error

2024-05-27 10:01:14 2024-05-27 03:01:14,559 DEBUG [org.keycloak.services.managers.AuthenticationManager] (executor-thread-12) Failed to verify identity token: Token is not active
2024-05-27 10:01:14 2024-05-27 03:01:14,560 DEBUG [org.keycloak.services.resources.admin.AdminRoot] (executor-thread-12) Token not valid
2024-05-27 10:01:14 2024-05-27 03:01:14,560 DEBUG [WebApplicationException] (executor-thread-12) Restarting handler chain for exception exception: jakarta.ws.rs.NotAuthorizedException: HTTP 401 Unauthorized
2024-05-27 10:01:14     at org.keycloak.services.resources.admin.AdminRoot.authenticateRealmAdminRequest(AdminRoot.java:186)

image

vunguyenhung avatar May 27 '24 03:05 vunguyenhung

I think the reason is that the token validity of Keycloak is 1 min so it seems you need to refresh the token on the background to keep authenticated.

RogerParis avatar May 31 '24 11:05 RogerParis