8000 AI Agent acting on behalf of a user: tokens can’t be refreshed after the user logs out · keycloak keycloak · Discussion #53875 · GitHub
[go: up one dir, main page]

Skip to content
Discussion options

You must be logged in to vote

With what Keycloak ships today, option 4 is the way to go. Standard token exchange won't give you an offline or long-lived token, and that's by design.

In V2 the refresh setting only has two values, NO and SAME_SESSION. If the subject token comes from an offline (or transient) session, asking for requested_token_type=refresh_token fails with "creating a new session is needed". An access-token exchange is then served from a transient session, which is why option 2 gives you no refresh token. offline_access is also rejected explicitly. This was a deliberate choice when V2 was designed: in #37115 minting offline tokens through exchange was considered too powerful, with a note to revisit if p…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by mosherobinov
Comment options

0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
0