Quarkus with OIDC and VertX static route not redirecting on token expiration

I have a super simple application that is used to serve static HTML files and leverage OIDC for access to these files.

What I'm seeing is that on first access Quarkus redirects the browser to the IDP (Keycloak) properly, I get the token, and all is good.

However, once the token expires I'm only given a 401 with no chance to re-login. I know it's not up to the Quarkus server side to refresh the token but why not another redirect to the IDP?

The parts that I believe are relevant - this is Quarkus 3.4.3 using Java 17. My contains:





the last line is suggested by (logged with package names limited to 3 chars) on startup.

I setup the static files with:

public class StaticContentDeclarativeRoute {
    @ConfigProperty(name = "")
    String staticRootDirectory;

    @Route(path = "/*", methods = Route.HttpMethod.GET)
    void indexContent(RoutingContext routingContext) {
        StaticHandler.create(FileSystemAccess.ROOT, staticRootDirectory)

Lastly, the only other code is to help with logging:

public class VertexFilter {
    Logger logger;

    void routeFilter(RoutingContext routingContext) {"user \"" +
           (routingContext.user() == null ? "unknown" : routingContext.user().subject()) +
           "\" is accessing " + routingContext.normalizedPath() );;

Am I being naive to not have something more sophisticated on the front end to manage the tokens (i.e. something like this)? Is there a configuration parameter I'm missing that is the "redirect back to the IDP if the token is expired" parameter?

Thanks for your help.


  • I had the same behavior with quarkus v3.4.3. I solved it by setting the property to false (

    At the moment I am not sure why the state is missing. I checked the current quarkus version and the property has changed to false as default (

    Edit: Was changed with the commit -