Skip to content

fixed python token validation loop bug#91

Open
raphael-frank wants to merge 1 commit into
mainfrom
fix/python-token-validation
Open

fixed python token validation loop bug#91
raphael-frank wants to merge 1 commit into
mainfrom
fix/python-token-validation

Conversation

@raphael-frank

Copy link
Copy Markdown
Collaborator

Opening the helper tab triggered an infinite page reload loop. Every request to the Python genai service returned 401, which caused the Axios interceptor to call keycloak.login(), redirecting to Keycloak and back — endlessly.

PyJWKClient was called with a jwks_data keyword argument that doesn't exist in PyJWT 2.10.1. This raised a TypeError on every token validation, silently caught and returned as 401.

The fix: Replaced broken manual JWKS cache in auth.py with PyJWKClient's built-in caching (cache_jwk_set=True, lifespan=300).

@raphael-frank raphael-frank added bug Something isn't working genAI Issue regarding the GenAi service labels Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working genAI Issue regarding the GenAi service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants