mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-21 07:23:11 +00:00
* 🥖 fix: Refresh MCP Credentials That Arrive Already Expired
storeTokens replaced a stated access-token lifetime with the 365-day default whenever it had already elapsed, so a credential that arrived expired was recorded as valid for a year. getTokens decides to refresh from that record, so it never did: recovery waited for the resource server to reject a request, and on connection establishment a second rejection of the refreshed tokens starts interactive OAuth instead.
A lifetime stated by the response is now persisted as it stands, including when it has elapsed, so the next read refreshes it silently. A JWT exp keeps its existing leniency because it comes from the provider clock, where skew can make a live credential look expired.
* style: Sort the jsonwebtoken Import in the Expiry Suite
Package imports are ordered by line length, so `keyv` precedes `jsonwebtoken`. Fixes the Static checks import-order gate.
* fix: Renew Expired OAuth Results Before Connection Readiness
Preserve finite zero lifetimes at exchange and storage. Both callback consumers re-read expired flow results through coordinated refresh after crossing and releasing the callback persistence fence. Cover the real SDK callback transaction, concurrent token waiter, zero-expiry updates, retryable failures, bounded recovery, cancellation, and the unchanged fast path.
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|---|---|---|
| .. | ||
| openapi | ||
| src | ||
| types | ||
| .gitignore | ||
| babel.config.cjs | ||
| jest.config.mjs | ||
| jest.setup.cjs | ||
| package.json | ||
| tsconfig-paths-bootstrap.mjs | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsconfig.openapi.json | ||
| tsconfig.spec.json | ||
| tsdown.config.mjs | ||