mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-27 04:36:12 +01:00
🔐 fix: persist new MCP oauth tokens properly (#10439)
* fix: re-fetch OAuth flow state after completeOAuthFlow * test: add tests for MCP OAuth flow state bugs
This commit is contained in:
parent
2524d33362
commit
b443254151
4 changed files with 127 additions and 8 deletions
|
|
@ -217,7 +217,11 @@ export class MCPTokenStorage {
|
|||
}
|
||||
}
|
||||
|
||||
logger.debug(`${logPrefix} Stored OAuth tokens`);
|
||||
logger.debug(`${logPrefix} Stored OAuth tokens`, {
|
||||
client_id: clientInfo?.client_id,
|
||||
has_refresh_token: !!tokens.refresh_token,
|
||||
expires_at: 'expires_at' in tokens ? tokens.expires_at : 'N/A',
|
||||
});
|
||||
} catch (error) {
|
||||
const logPrefix = this.getLogPrefix(userId, serverName);
|
||||
logger.error(`${logPrefix} Failed to store tokens`, error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue