OpenID Connect Token Reuse with Auth0 (Support JWE format and openid audience) #8797
SollalF
started this conversation in
Feature Requests & Suggestions
Replies: 1 comment 1 reply
-
Hi @SollalF this seems more like a feature request, would you be open to submitting a PR for a solution that works for you? Documentation so I can help test it would be appreciated as well. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
Problem Description
When using
OPENID_REUSE_TOKENS=true
with Auth0 as the OpenID provider, LibreChat enters an infinite refresh loop where the client continuously makes token refresh requests, preventing normal application usage.Root Cause
Auth0 returns encrypted access tokens (JWE format) by default, which cannot be validated as JWTs by LibreChat. The strategy expects standard JWT tokens for validation using JWKS, but receives encrypted tokens
This causes authentication to fail repeatedly, triggering the refresh loop.
Environment
Current Workaround
Two possible workarounds were identified:
Option 1: Use ID Token for Authentication
Option 2: Configure Audience for JWT Access Tokens
However, LibreChat currently seems to lack built-in support for setting the openid audience parameter.
Files Affected
api/strategies/openidStrategy.js
api/server/services/AuthService.js
.env.example
(for documentation)Would you like me to help you format this differently or add any additional technical details?
Version Information
6fd3b56
Steps to Reproduce
OPENID_REUSE_TOKENS=true
OPENID_SCOPE=openid profile email offline_access
What browsers are you seeing the problem on?
Chrome
Relevant log output
Screenshots
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions