mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 13:00:55 +00:00
* fix: Only Hand Out OpenID Access Tokens the Bearer Verifier Accepts The OpenID reuse path in refreshController and the post-refresh fallback in getOpenIDAppAuthToken returned the cached access token as the app auth token whenever its exp was in the future. Entra issues Microsoft Graph access tokens to sign-in clients by default; their aud names Graph, so the bearer verifier rejects them and every protected request answers 401 until the client loops. Both paths now require the access token's aud to name the client id or an OPENID_AUDIENCE entry, the same audiences the verifier accepts. The reuse path refreshes with the IdP instead, and the post-refresh fallback keeps opaque tokens as before. Audience parsing is shared with openIdJwtStrategy. Related to #17791 * test: Exercise Real OpenID Audience Helpers in AuthService Spec The AuthService spec stubbed the audience helpers as pass-throughs, so it could not catch a foreign-audience access token escaping the post-refresh fallback. Use the real exports and cover Graph-audience, configured-audience and opaque access tokens through setOpenIDAuthTokens. |
||
|---|---|---|
| .. | ||
| controllers | ||
| middleware | ||
| routes | ||
| services | ||
| utils | ||
| cleanup.js | ||
| csp.spec.js | ||
| experimental.js | ||
| experimental.spec.js | ||
| index.js | ||
| index.metrics.spec.js | ||
| index.spec.js | ||
| socialLogins.js | ||
| socialLogins.spec.js | ||
| telemetry.js | ||
| telemetry.spec.js | ||