LibreChat/api
Peter bf80cf30b3
*️⃣ feat: Reuse OpenID Auth Tokens (#7397)
* feat: integrate OpenID Connect support with token reuse

- Added `jwks-rsa` and `new-openid-client` dependencies for OpenID Connect functionality.
- Implemented OpenID token refresh logic in `AuthController`.
- Enhanced `LogoutController` to handle OpenID logout and session termination.
- Updated JWT authentication middleware to support OpenID token provider.
- Modified OAuth routes to accommodate OpenID authentication and token management.
- Created `setOpenIDAuthTokens` function to manage OpenID tokens in cookies.
- Upgraded OpenID strategy with user info fetching and token exchange protocol.
- Introduced `openIdJwtLogin` strategy for handling OpenID JWT tokens.
- Added caching mechanism for exchanged OpenID tokens.
- Updated configuration to include OpenID exchanged tokens cache key.
- updated .env.example to include the new env variables needed for the feature.

* fix: update return type in downloadImage documentation for clarity and fixed openIdJwtLogin env variables

* fix: update Jest configuration and tests for OpenID strategy integration

* fix: update OpenID strategy to include callback URL in setup

* fix: fix optionalJwtAuth middleware to support OpenID token reuse and improve currentUrl method in CustomOpenIDStrategy to override the dynamic host issue related to proxy (e.g. cloudfront)

* fix: fixed code formatting

* Fix: Add mocks for openid-client and passport strategy in Jest configuration to fix unit tests

* fix eslint errors: Format mock file openid-client.

*  feat: Add PKCE support for OpenID and default handling in strategy setup

---------

Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
Co-authored-by: Ruben Talstra <RubenTalstra1211@outlook.com>
2025-05-23 17:40:40 -04:00
..
app 🦾 feat: Claude-4 Support (#7509) 2025-05-22 15:00:44 -04:00
cache *️⃣ feat: Reuse OpenID Auth Tokens (#7397) 2025-05-23 17:40:40 -04:00
config 🔧 fix: Keyv and Proxy Issues, and More Memory Optimizations (#6867) 2025-04-13 23:01:55 -04:00
lib 🔍 refactor: Search & Message Retrieval (#6903) 2025-04-16 21:07:43 -04:00
models feat: Agent Version History and Management (#7455) 2025-05-23 17:40:39 -04:00
server *️⃣ feat: Reuse OpenID Auth Tokens (#7397) 2025-05-23 17:40:40 -04:00
strategies *️⃣ feat: Reuse OpenID Auth Tokens (#7397) 2025-05-23 17:40:40 -04:00
test *️⃣ feat: Reuse OpenID Auth Tokens (#7397) 2025-05-23 17:40:40 -04:00
utils 🦾 feat: Claude-4 Support (#7509) 2025-05-22 15:00:44 -04:00
jest.config.js *️⃣ feat: Reuse OpenID Auth Tokens (#7397) 2025-05-23 17:40:40 -04:00
jsconfig.json feat(api): initial Redis support; fix(SearchBar): proper debounce (#1039) 2023-10-11 17:05:47 -04:00
package.json *️⃣ feat: Reuse OpenID Auth Tokens (#7397) 2025-05-23 17:40:40 -04:00
typedefs.js 🔄 fix: Assistants Endpoint & Minor Issues (#7274) 2025-05-07 17:11:33 -04:00