Replies: 3 comments 10 replies
-
Hi @mbuchner, thanks for this report,
You could've asked earlier, we are here to help :-) Just a minor comment re your config first:
If it is related to the encrypted session cookie exceeding 4K limit - it should be managed automatically now by Quarkus OIDC in such cases, please try later As far as the ID token refresh is concerned, But you have to allow Quarkus to refresh - this is not done out of the box, because RT can last for a very long time, but the application may not want an unlimited session time for the authenticated users which may happen if the session is constantly refreshed. See https://quarkus.io/guides/security-oidc-code-flow-authentication#session-management, simply enable the refresh and if you'd like, which I recommend, add a refresh skew, which will proactively refresh all tokens once the ID token has nearly expired (ex, within the next 10 minutes). Let me know how it goes |
Beta Was this translation helpful? Give feedback.
-
Okay further investigation has been done - but still not really happy. I just got a hack working ... We figured out that the "grant_type=refresh_token" request doesnt return an ID token. Only an access and refresh token. We got the log "ID token is not returned in the refresh token grant response, re-authentication is required" We followed then the chapter in the quarkus documentation (https://quarkus.io/guides/security-oidc-code-flow-authentication#oauth2) - as there is something mentioned about "no ID token in refresh response" - but nothing worked ... quarkus always wanted to refresh after 5 min (end of ID token lifetime) There would actually be a grant_type "id_token" (see above well-known file) which is supported - which could be called if there is no ID token in the "refresh token grant response" - so there would be a possibility to get the ID token but I dont see any implementation in the quarkus source code arround "id_token"grant_type. Finally here is our current hack to avoid quarkus to do a "refresh_token" call.
I also have to say that we dont use the UserInfo endpoint - we dont need any data from it. Hoping to find a better solution - waiting for your thoughts ... Thanks Max |
Beta Was this translation helpful? Give feedback.
-
So if I understand it correctly, your provider returns ID token in the authorization code flow response, but, when the ID has expired, and the tokens are refreshed, it does not return an ID token ? But if the ID token has become invalid (i.e, expired in this case), and no new ID token is returned, there is no choice but request it via an authorization code flow.
It is not a grant type, but a response type, this is part of the different flows, SPA would use the id_token response type to get the id token returned to it
Do you mean your provider does not return an ID token at all, and you also have |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
We have implemented the Authorization Code Flow with Quarkus. We were forced to as our customer doesn't support Authorization Code Flow in frontend SPA applications. (Netscaler)
https://quarkus.io/guides/security-oidc-code-flow-authentication
We got it running so far after several days of trial and error.
What doesn't work is the refresh. They are not sending a JWT refresh token but only a binary (opaque) refresh token.
(In DEV environment we use Keycloak - and everything is working fine ...)
Here an excerpt of our config:
They pretend to send the following information:

Could it be that quarkus doesnt use the "refresh_token_expires_in" but instead uses "refresh_expires_in".
At least thats the only string I could find in the quarkus sources:
https://github.com/quarkusio/quarkus/blob/main/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcConstants.java
Could anybody confirm my suspicion?
Can I overwrite this value somehow so that "refresh_token_expires_in" is used?
Or am I on the wrong track and something else is wrong in our setup ... I am open for any input as I am freaking out now after 2 days :-)
Thanks Max
PS: Is there a way to print the response header / body .. of quarkus OIDC requests ?
Beta Was this translation helpful? Give feedback.
All reactions