LibreChat/api/strategies
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
..
appleStrategy.js 🍎 feat: Apple auth (#5473) 2025-01-31 09:49:09 -05:00
appleStrategy.test.js 🍎 feat: Apple auth (#5473) 2025-01-31 09:49:09 -05:00
discordStrategy.js 🍎 feat: Apple auth (#5473) 2025-01-31 09:49:09 -05:00
facebookStrategy.js 🍎 feat: Apple auth (#5473) 2025-01-31 09:49:09 -05:00
githubStrategy.js feat: added Github Enterprise SSO login (#5621) 2025-02-03 15:30:02 -05:00
googleStrategy.js 🧠 feat: Reasoning UI for Agents (#5904) 2025-02-15 18:52:29 -05:00
index.js *️⃣ feat: Reuse OpenID Auth Tokens (#7397) 2025-05-23 17:40:40 -04:00
jwtStrategy.js *️⃣ feat: Reuse OpenID Auth Tokens (#7397) 2025-05-23 17:40:40 -04:00
ldapStrategy.js 💽 fix: Exclude index page / from static cache settings (#7382) 2025-05-16 10:18:52 -04:00
localStrategy.js 🔐 refactor: Unverified User Verification Logic (#4482) 2024-10-21 07:51:45 -04:00
openIdJwtStrategy.js *️⃣ feat: Reuse OpenID Auth Tokens (#7397) 2025-05-23 17:40:40 -04:00
openidStrategy.js *️⃣ feat: Reuse OpenID Auth Tokens (#7397) 2025-05-23 17:40:40 -04:00
openidStrategy.spec.js *️⃣ feat: Reuse OpenID Auth Tokens (#7397) 2025-05-23 17:40:40 -04:00
process.js 📧 feat: email verification (#2344) 2024-06-07 15:06:47 -04:00
socialLogin.js *️⃣ feat: Reuse OpenID Auth Tokens (#7397) 2025-05-23 17:40:40 -04:00
validators.js 🌍 feat: Extend regex to support international usernames (#1918) 2024-02-28 14:27:57 -05:00
validators.spec.js 🌍 feat: Extend regex to support international usernames (#1918) 2024-02-28 14:27:57 -05:00