Skip to content

Issues with quarkus-oidc-redis-token-state-manager #50315

@Jaland

Description

@Jaland

Describe the bug

Native Image Issues with OIDC Redis Token State Manager

Summary

The quarkus-oidc-redis-token-state-manager seems to be having some issues with Native Builds (but works fine with normal JVM).

Create a repo with some example code that is breaking

Initially, the native image failed to start. After applying changes from this commit, the application now starts but gets stuck in an infinite redirect loop. When the OAuth server redirects back to the application, the application immediately redirects back to the OAuth server.

Environment

  • Quarkus Version: 3.26.3
  • Java Version: 17
  • Build Tool: Maven 3.8+
  • OS: Linux (tested on Fedora 42)
  • OAuth Provider: Google OAuth 2.0
  • Token Storage: Redis 7

The OIDC Redis token state manager should work in native images without requiring:

  • Manual reflection registration for internal classes
  • Jackson workaround flags
  • Additional build arguments

These should be automatically handled by the extension when building native images.

Additional Context

This issue makes the quarkus-oidc-redis-token-state-manager extension unusable in production native deployments. The authentication loop suggests that token serialization/deserialization in Redis may not be working correctly in native images, even with the attempted reflection configuration.

The fact that the same configuration works perfectly in JVM mode indicates this is specifically a native image compatibility issue within the OIDC Redis integration.

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

Mandrel or GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions